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

Glossary: Allows special characters in keywords

    XMLWordPrintable

Details

    Description

      When using the glossary, you can enter a special character in the keywords list, such as a greater-than sign >. If you do this with an auto-linked glossary item, it will make a right old mess of all the HTML across the course.

      Steps to replicate:
      1. In a glossary, edit settings and change the summary to include the phrase 'good > evil'. (Using the HTML editor, so that the > here will actually be 'ampersand gt semicolon'.)

      2. Add a new entry in the glossary:
      a. Concept 'greater than'
      b. Description 'blah'
      c. Keywords: >
      d. Set auto-link to true.

      3. Save the entry

      EXPECTED:

      Either, the resulting page should correctly show the entry, and the > in the summary should be autolinked to the entry.

      Or, after saving the user should be returned to the form with a validation error on the keyword list indicating that > is not a valid character for use in keywords. (Note, also check other problematic characters & < ", or else have a whitelist. If there is a whitelist it should probably permit all UTF-8 characters above ASCII range so as to support foreign language characters.)

      ACTUAL:

      Current result is that the heading of the saved entry is mangled; entry displays as:

      <%1-%-0%><#1-%-0#><%2-%-1%>
      blah
      

      Attachments

        Activity

          People

            peterdias Peter Dias
            quen Sam Marshall
            Mathew May Mathew May
            Mihail Geshoski Mihail Geshoski
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 41 minutes
                2h 41m

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.