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

Double escape on special chars - frequently used questions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.4, 3.2, 3.3
    • Fix Version/s: 3.1.6, 3.2.3
    • Component/s: Grading methods
    • Labels:

      Description

      When creating a frequently used question that has special chars, those special chars are being escaped twice - this is because they are used with a mustache template

      STEPS TO REPLICATE
      Log onto Moodle Site
      Navigate to a course
      Create a new assignment/advanced forum that uses marking guide
      Define marking guide if needed.
      Add frequently used comments that contain special chars.
      View assignment/advanced forum in Joule Grader/Moodler Grader.
      View the Frequent Comments.
      OBSERVED BEHAVIOR:
      Special characters are not displayed. The HTML code for the characters are displayed.
      EXPECTED BEHAVIOR:
      The HTML Code should not be shown it should be the actual special character that is being displayed.

      Reason for bug:

      grade/grading/form/guide/renderer.php

      class gradingform_guide_renderer

      public function criterion_template

      $commentoption->description = s($comment['description']); <- escaping prior to template

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

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