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

Some forum mails not sent because of wrong html entity decoding

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3.4, 2.4.1
    • 2.3.2
    • Forum
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE, MOODLE_24_STABLE
    • w51_MDL-36212_m25_entities
    • Hide

      1/ execute phpunit tests in PHP 5.3.2-3
      2/ execute phpunit tests in PHP >= 5.3.4
      3/ execute phpunit tests in PHP >= 5.4.0

      4/ optionally verify GoogleSpellchecker is working for words with html entities
      5/ optionally compose forum post in markdown format with unicode HTML entities and verify mailed plain text version

      Show
      1/ execute phpunit tests in PHP 5.3.2-3 2/ execute phpunit tests in PHP >= 5.3.4 3/ execute phpunit tests in PHP >= 5.4.0 — 4/ optionally verify GoogleSpellchecker is working for words with html entities 5/ optionally compose forum post in markdown format with unicode HTML entities and verify mailed plain text version

      The default charset of get_html_translation_table() is ISO-8859-1 for versions of PHP prior to 5.4.0 (http://php.net/manual/en/function.get-html-translation-table.php).

      We've detected the problem because some forum emails (those with html entities) were not being sent because a database error (MySQL):

      Incorrect string value: '\xA0\xA0\xA0\xA0\xA0\xA0...' for column 'fullmessage' at row 1

      To fix the problem pass the encoding parameter to get_html_translation_table():

      get_html_translation_table(HTML_ENTITIES, ENT_COMPAT|ENT_HTML401, 'utf-8');

      Maybe other versions of moodle and other components are affected by this bug.

        1. mdl36212.patch
          1.0 kB
          Juan Segarra Montesinos

            skodak Petr Skoda
            jsegarra Juan Segarra Montesinos
            Sam Hemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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