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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.7
    • None
    • General
    • None
    • 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

              Unassigned Unassigned
              mrevans.info Brian Evans
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: