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

Custom menu not displaying ampersand correctly in Boost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.3.2, 3.3.5, 3.4.2
    • Fix Version/s: 3.3.6, 3.4.3
    • Component/s: Navigation, Themes
    • Labels:
    • Testing Instructions:
      Hide

      _Note:_ Test on Boost theme.

      1. Log in as admin.
      2. Go to Site Administration → Appearance → Theme settings (admin/settings.php?section=themesettings)
      3. In Custom menu items (custommenuitems), copy and paste the following:

        Moodle & the community|https://moodle.org
        -Moodle free & support|https://moodle.org/support
        -Moodle & Docs|http://docs.moodle.org|Moodle Docs
        -German Moodle & Docs|http://docs.moodle.org/de|Documentation in German|de
        -###
        -Moodle & development|https://moodle.org/development
        Moodle.com & stuff|http://moodle.com/
        

      4. Save changes
      5. Check the custom menu and items on the site's navigation header.
      6. Confirm that the custom menu item shows the ampersand (&) characters are a rendered correctly and not escaped (e.g. "&")
      Show
      _ Note: _ Test on Boost theme. Log in as admin. Go to Site Administration → Appearance → Theme settings (admin/settings.php?section=themesettings) In Custom menu items (custommenuitems), copy and paste the following: Moodle & the community|https://moodle.org -Moodle free & support|https://moodle.org/support -Moodle & Docs|http://docs.moodle.org|Moodle Docs -German Moodle & Docs|http://docs.moodle.org/de|Documentation in German|de -### -Moodle & development|https://moodle.org/development Moodle.com & stuff|http://moodle.com/ Save changes Check the custom menu and items on the site's navigation header. Confirm that the custom menu item shows the ampersand (&) characters are a rendered correctly and not escaped (e.g. " & ")
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60414-master

      Description

      Ampersand, (&) does not display properly in custom menu items in Boost, it displays as &

      To reproduce this:

      With Boost theme active, add & and & into a menu item(s) in Theme Settings - Custom menu items

      Example menu items:

      Menu & 1|#
      Menu & 2|#

      Expected:

      & and & both appear as &

      Actual:

      In Boost, & and & both appear as &

      Switch to Clean or More, & and & both appear as &

      I've only tested this in 3.3.1 and 3.3.2.

       

      Update

      Note: sorry for the extra space when referring to & amp; I couldn't figure out how to get the code for ampersand displaying as the code in the tracker editor  it keeps wanting to change back to just the & character.

      Fix found for this thanks to Alex Christensen on the Atlassian JIRA community referring me to the solution ([https://jira.atlassian.com/browse/JRASERVER-10967|https://jira.atlassian.com/browse/JRASERVER-10967)] which is to add & just need to be careful as when returning to edit the extra amp; is gone and needs re-adding.

        Attachments

        1. image-2018-05-03-10-07-19-483.png
          image-2018-05-03-10-07-19-483.png
          19 kB
        2. MDL-60414-after.png
          MDL-60414-after.png
          8 kB
        3. MDL-60414-before.png
          MDL-60414-before.png
          10 kB
        4. menus-patch.diff
          2 kB
        5. screenshot-1.png
          screenshot-1.png
          25 kB

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  17/May/18

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m