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

Adapt code to removed PHP tidy option 'drop-font-tags'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.11.8, 4.0.2
    • 3.9.2, 3.10, 3.11, 3.11.7, 4.0
    • Filters
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-69951-remove_drop-font-tags
    • Hide

      Steps

      1. Set up a Moodle site on a web server.
      2. In Moodle under Site administration > Development > Debugging ensure a) Debug messages is set to DEVELOPER ($CFG->debug = (E_ALL | E_STRICT)), and b) Display debug messages is Yes ($CFG->debugdisplay = 1).
      3. Install the PHP extension php-tidy. Ensure the libtidy dependency that is installed is version 5.5.14 or later.
      4. If necessary, restart the web server service to reflect the above change in PHP configuration (for example: on CentOS 8: systemctl restart php-fpm).
      5. In Moodle under Site administration > Server > PHP info verify the following: a) Tidy support: enabled, b) libTidy Version: 5.5.14 or later.
      6. In Moodle under Site administration > Plugins > Filters > Manage filters for HTML tidy change the setting under Active? to On.
      7. In Moodle click on the Site administration link (admin/search.php).

      Expected results

      There are no error messages, specifically the error Notice: tidy_repair_string(): Unknown Tidy Configuration Option 'drop-font-tags' in /var/www/up39-310.ideapad/moodle/filter/tidy/filter.php on line 64 should not appear.

       

      Show
      Steps Set up a Moodle site on a web server. In Moodle under Site administration > Development > Debugging ensure a) Debug messages is set to DEVELOPER ( $CFG->debug = (E_ALL | E_STRICT) ), and b) Display debug messages is Yes ( $CFG->debugdisplay = 1 ). Install the PHP extension php-tidy. Ensure the libtidy dependency that is installed is version 5.5.14 or later. If necessary, restart the web server service to reflect the above change in PHP configuration (for example: on CentOS 8: systemctl restart php-fpm ). In Moodle under Site administration > Server > PHP info verify the following: a) Tidy support: enabled, b) libTidy Version: 5.5.14 or later. In Moodle under Site administration > Plugins > Filters > Manage filters for HTML tidy change the setting under Active? to On. In Moodle click on the Site administration link ( admin/search.php ). Expected results There are no error messages, specifically the error Notice: tidy_repair_string(): Unknown Tidy Configuration Option 'drop-font-tags' in /var/www/up39-310.ideapad/moodle/filter/tidy/filter.php on line 64 should not appear.  

      On my local Moodle development environment as well as on the live website on a webspace since today, a PHP message is visible on the site:

      Notice: tidy_repair_string(): Unknown Tidy Configuration Option 'drop-font-tags' in /usr/www/moodle/htdocs/filter/tidy/filter.php on line 64

      It appears once and several times on large pages as course pages.

      After examining some documentation it seems that the tidy HTML purifier has removed the "drop-font-tags" option in newer versions. 

      Comenting out line 50 in filter.php let the message disappear.

      But for sure, the option was set by purpose in Moodle and I don't know about possible side effects, so I would appreciate you check this error and have a solution working with current tidy HTML purifier versions.

        1. Moodle tidy drop-font-tags error message 2020-10-15.png
          142 kB
          Marco Rademacher
        2. MDL-69951_v400_1.png
          100 kB
          Angelia Dela Cruz
        3. MDL-69951_v400_2.png
          94 kB
          Angelia Dela Cruz
        4. MDL-69951_master_1.png
          95 kB
          Angelia Dela Cruz
        5. MDL-69951_master_2.png
          103 kB
          Angelia Dela Cruz
        6. MDL-69951_v311_1.png
          100 kB
          Angelia Dela Cruz
        7. MDL-69951_v311_2.png
          126 kB
          Angelia Dela Cruz

            leonstr Leon Stringer
            marcorad Marco Rademacher
            Laurent David Laurent David
            Ilya Tregubov Ilya Tregubov
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            2 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 28 minutes
                28m

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