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

html_to_text does not correctly decode single quote entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.7.7, 2.8.5
    • Libraries
    • MOODLE_27_STABLE, MOODLE_28_STABLE

      Discovered while writing tests for MDL-48002.
      Clients which use a quoted-printable encoding will encode single quotes as their HTML entity version:

      '
      

      However, the version of html2text that we use only converts double quotes:
      https://github.com/moodle/moodle/blob/master/lib/html2text.php#L522

              $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8');
      

      Unfortunately, MDL-49527 was rejected and we did not update HTML2Text yet. The version in master for roundcube has changed that line (https://github.com/roundcube/roundcubemail/blob/master/program/lib/Roundcube/rcube_html2text.php#L473):

              $text = html_entity_decode($text, ENT_QUOTES, $this->charset);
      

            Unassigned Unassigned
            dobedobedoh Andrew Lyons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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