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

Incorrect role name HTML escaping in permissions screen tool tips

    XMLWordPrintable

    Details

      Description

      This is similar to MDL-70320. Our sharp eyed testers spotted that it did not just happen in the visible text, but also in some of the tool tips.

      To reproduce:

      1. Go to https://qa.moodledemo.net/course/edit.php?id=2 and use Role renaming to change some role names to contain HTML special chars like & < and >.
      2. Go to https://qa.moodledemo.net/admin/roles/permissions.php?contextid=25.
      3. Hover your mouse over the Delete icons.

      Expected result: tool tip says "Delete Reader & Learner role"

      Actual result: tool tip says "Delete Reader & amp;amp; Learner role"

      HTML source of the icon is:
      <i class="icon fa fa-trash fa-fw " title="Delete Reader & amp;amp;amp; Learner role" aria-label="Delete Reader &amp;amp; Learner role"></i>

      So, this is being excaped twice more than required!

      (Grrr! extra spaced added to stop Jira messing with the entities.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Peer reviewer:
              David Mudrák (@mudrd8mz)
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Jan/21

                  Time Tracking

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