Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-46781

URLs with query strings break target="_blank" in custom menus

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Component/s: General
    • Labels:
      None
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      Setting the target in custom menus doesn't work if there is a query string appended to the URL.

      Setting the target works fine with menu items like this:

      Web Site | http://www.website.org" target="_blank | This is a web site

      But fails for menu items like this:

      Web Site2 | http://www.website2.org/?page_id=66" target="_blank | This is another web site

      In the HTML for the page, the link for website2.org shows up like this:

      <a href="http://www.website2.org/?page_id=66%22%20target%3D%22_blank">Web Site 2 </a>

      I have checked this on multiple themes and it always happens. I also thought it might be a filter but the only filters I have enabled are: MathJax, Activity names auto-linking, Multimedia plugins, and Display emoticons as images. None of these seemed likely to mess with URLs in the menus.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mrevans.info Brian Evans
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: