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

filter_emoticon applies to HTML attributes in labels

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Filters
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      Originally reported in Link with special characters break in 3.9.

      The Display Emoticons As Images filter applies to attributes of HTML elements in labels (and presumably other activities and resources). So if you have a link and the URL contains an emoticon sequence this gets converted – i.e. broken – on display.

      Prior to Moodle 3.9 this filter was disabled by default (MDL-68563).

      Steps to reproduce issue:

      1. Create a course with a label resource.
      2. Label settings:
        1. Label text: "A link test".
        2. Highlight the word "link" and click the Link toolbar button.
        3. In Enter a URL: "https://www.example.com/8-otest.html" and click Create link.
        4. Click Save and return to course.

      Expected results:
      The label text 'A link test' is displayed and the word 'link' is a link to https://www.example.com/8-otest.html.

      What actually happens:
      The label text 'A test.html">link test' is displayed and 'test.html">link' is a link to https://www.example.com/%3Cimg%20class=.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              leonstr Leon Stringer
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: