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

In question management, category selection fields do escape < > and & in optgroup labels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.9.7, 3.10.4
    • 3.2.5, 3.3.2, 3.4, 3.9.6, 3.10.3, 3.11
    • Questions
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-60331-master_take3
    • Hide

      Category selector

      1. Log in as manager, or at least a role which has course category creation capabilities.
      2. Open Course and category management course/management.php?categoryid=0.
      3. Click "Create new category" to create a course category under Miscellaneous called "fish & chips".
      4. Create new category "0 < 1" in the new "fish & chips" category.
      5. Create new category "2 > 1" in the new "0 < 1" category.
      6. Create new category 'Double " quotes' in the new "2 > 1" category.
      7. Create new category "Single ' quote" in the new 'Double " quotes' category.
      8. Create a course "question bank test course" in the new "Single ' quote" category
      9. Go to that course's question bank question/edit.php?courseid=XX* Select the pull down menu "Select a category"
      10. Verify the <, > and & is correctly displayed and not entity escaped.

      Move question to a category selector

      1. Go to course question bank, to the 'questions' tab.
      2. Create a question.
      3. Select the question.
      4. In the select menu next to "Move to >>" verify the <, > and & is correctly displayed and not entity escaped.

      "Add a category" parent category selector

      1. Go to course question bank, to the 'categories' tab.
      2. In the "Add category" "Parent category" select menu verify the <, > and & is correctly displayed and not entity escaped.
      Show
      Category selector Log in as manager, or at least a role which has course category creation capabilities. Open Course and category management course/management.php?categoryid=0. Click "Create new category" to create a course category under Miscellaneous called "fish & chips". Create new category "0 < 1" in the new "fish & chips" category. Create new category "2 > 1" in the new "0 < 1" category. Create new category 'Double " quotes' in the new "2 > 1" category. Create new category "Single ' quote" in the new 'Double " quotes' category. Create a course "question bank test course" in the new "Single ' quote" category Go to that course's question bank question/edit.php?courseid=XX* Select the pull down menu "Select a category" Verify the <, > and & is correctly displayed and not entity escaped. Move question to a category selector Go to course question bank, to the 'questions' tab. Create a question. Select the question. In the select menu next to "Move to >>" verify the <, > and & is correctly displayed and not entity escaped. "Add a category" parent category selector Go to course question bank, to the 'categories' tab. In the "Add category" "Parent category" select menu verify the <, > and & is correctly displayed and not entity escaped.

      Steps to reproduce:

      • Log in as manager, or at least a role which has course category creation capabilities.
      • Open Course and category management course/management.php?categoryid=0.
      • Click "Create new category" to create a course category under Miscellaneous called "fish & chips".
      • Create new category "0 < 1" in the new "fish & chips" category.
      • Create new category "2 > 1" in the new "0 < 1" category.
      • Create new category 'Double " quotes' in the new "2 > 1" category.
      • Create new category "Single ' quote" in the new 'Double " quotes' category.
      • Create a course "question bank test course" in the new "Single ' quote" category
      • Go to that course's question bank question/edit.php?courseid=XX* Select the pull down menu "Select a category"

          
      What you see:
      The title for the fourth entry states "Category: 2 > 1"
      The title for the fifth entry states "Category: 0 < 1"
      The title for the sixth entry states "Category: fish & chips"
          
      What you expect:
      The title for the fourth entry states "Category: 2 % gt; 1"
      The title for the fifth entry states "Category: 0 & lt; 1"
      The title for the sixth entry states "Category: fish & amp; chips"

      This also applies for the selection when moving question ("With selected:" "move to>>").
      The values are set in the select field's optgroup labels.

       

            lucaboesch Luca Bösch
            lucaboesch Luca Bösch
            Tim Hunt Tim Hunt
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 5 minutes
                1h 5m

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