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

The character & is displayed as " & amp ; " in html tag attributes (for example "title" or "alt") - both format_string() and s() encode it

    XMLWordPrintable

Details

    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-47371-master
    • Hide
      Setup
      1. Login as admin.
      2. Create a course and add the special characters & ' " ¢ £ © € ¥ ® < > to the Course full name.
      3. Enrol a student to that course
      4. Login as a student.
      Course node loaded on page load
      1. Hover over the course's link under My courses. Check the title text being displayed.
        • Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt;)
      AJAX testing
      1. Click Site home on the navigation block.
      2. Expand the My courses node.
      3. Hover over the course's link. Check the title text being displayed.
        • Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt;)
      Book chapter testing
      1. Create a book with two chapters. Give them both the title & ' " ¢ £ © € ¥ ® < >
      2. On the left hand side in the "Table of contents" block, hover over one of the titles (whichever one is a link)
        • Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt;)
      Show
      Setup Login as admin. Create a course and add the special characters & ' " ¢ £ © € ¥ ® < > to the Course full name. Enrol a student to that course Login as a student. Course node loaded on page load Hover over the course's link under My courses . Check the title text being displayed. Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt; ) AJAX testing Click Site home on the navigation block. Expand the My courses node. Hover over the course's link. Check the title text being displayed. Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt; ) Book chapter testing Create a book with two chapters. Give them both the title & ' " ¢ £ © € ¥ ® < > On the left hand side in the "Table of contents" block, hover over one of the titles (whichever one is a link) Confirm that the title is rendered properly and that there are no escaped characters. (i.e. &amp;, &gt;, &lt; )
    • 3.2 Sprint 2

    Description

      FULL STEPS:
      1 - Add a book resource to a course
      2 - Any book name and description will do
      3 - Appearance and Common module settings to default
      4 - Save and return to course
      5 - Click on your newly created book and create two new Chapter
      First one:
      6 - Type: " & " for the Chapter title, without the quotes
      7 - Any content will do
      Second one:
      8 - Type: " & " for the Chapter title, without the quotes
      9 - Any content will do
      10 - Save changes
      11 - Now hover the chapter title links in the table of contents

      You will notice that the character " & " was transformed to " & amp;amp; " without the quotes in the link title attribute but remained as " & " in the toc itself

      Attachments

        Issue Links

          Activity

            People

              cameron1729 cameron1729
              cedricguindon cedric guindon
              Jun Pataleta Jun Pataleta
              Dan Poltawski Dan Poltawski
              Ryan Wyllie Ryan Wyllie
              Adrian Greeve, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Sep/16