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

Upgrade HTML Purifier to latest version

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Waiting for testing
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8
    • Fix Version/s: 3.9
    • Component/s: Libraries
    • Testing Instructions:
      Hide

      Test 1

      1. Log in as Admin.
      2. Create a Course.
      3. Enrol a Student in the Course.
      4. Create a Forum in the Course.
      5. Log in the Student.
      6. Go to the Forum.
      7. Create a discussion.
      8. In the discussion message, add a couple of HTML links with "Open in new window" checked and a couple with "Open in new window" unchecked.
      9. Save.
      10. View the discussion and verify, viewing source code, that any links that have the "target="xxxx"" attribute will have "rel=noreferrer noopener" attribute added.
      11. Make sure when opening a target="_blank" link that the original page is not redirected and the link is open in a new tab/window.
      12. Try the same sort of thing in other text areas and see if any don't add the attribute.

      Example:

      This:
      <a href="http://allthethings.co.nz/moodle/redirect.html" target="_blank">Test my link</a>
       
      Becomes:
      <a href="http://allthethings.co.nz/moodle/redirect.html" target="_blank" rel="noreferrer noopener">Test my link</a>

       

      Test 2

      Run all unit tests and check that failures don't relate to this issue.

      Show
      Test 1 Log in as Admin. Create a Course. Enrol a Student in the Course. Create a Forum in the Course. Log in the Student. Go to the Forum. Create a discussion. In the discussion message, add a couple of HTML links with "Open in new window" checked and a couple with "Open in new window" unchecked. Save. View the discussion and verify , viewing source code, that any links that have the " target="xxxx" " attribute will have " rel=noreferrer noopener " attribute added. Make sure  when opening a target="_blank" link that the original page is not redirected and the link is open in a new tab/window. Try the same sort of thing in other text areas and see if any don't add the attribute. Example: This: <a href="http://allthethings.co.nz/moodle/redirect.html" target="_blank">Test my link</a>   Becomes: <a href="http://allthethings.co.nz/moodle/redirect.html" target="_blank" rel="noreferrer noopener">Test my link</a>   Test 2 Run all unit tests and check that failures don't relate to this issue.
    • Affected Branches:
      MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-67372-master
    • Story Points:
      1
    • Sprint:
      Internationals - 3.9 Sprint 1

      Description

      HTML Purifier (/lib/htmlpurifier/) 4.10.0 --> 4.12.0: http://htmlpurifier.org/ 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rezaie9 Shamim Rezaie
                Reporter:
                sarjona Sara Arjona (@sarjona)
                Peer reviewer:
                Simey Lameze
                Integrator:
                Sara Arjona (@sarjona)
                Tester:
                Anna Carissa Sadia
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Fix Release Date:
                  11/May/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 30 minutes
                  2h 30m