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

Format_string in qtype_gapselect_renderer strips < character

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 3.6.2
    • Fix Version/s: None
    • Component/s: Questions
    • Labels:
    • Affected Branches:
      MOODLE_36_STABLE

      Description

      FULL STEPS

      • Create a select missing words question
      • Add < as one of the choices

      WHAT YOU EXPECTED

      • Expected < to display as option from select field

      WHAT ACTUALLY HAPPENS

      • Empty choice is displayed
      • Choose... is not displayed

      It looks like in the qtype_gapselect_renderer on line 60, format_string is being used to format the select options, however this function specifies that it is not for html. If a user is adding the less than symbol < as a choice, it breaks the output of the select field. It looks like format_text should be used here instead.

        Attachments

          Activity

            People

            • Assignee:
              lucaboesch Luca Bösch
              Reporter:
              meltonml Michelle Melton
              Participants:
              Component watchers:
              Tim Hunt, Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: