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

HTML Editor does not send http headers for character encoding

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.8
    • Component/s: HTML Editor (TinyMCE)
    • Labels:
      None
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Popups launched from a HTMLArea editor (e.g. to insert an image) only send the encoding in a meta tag, and not in a HTTP header. Now if the web server is configured to send a HTTP header for all pages with an ISO-8859-1 encoding, and the Moodle site in UTF-8, this gives problems : foreign characters in the popups appear garbled, as the HTTP header encoding overrides the one specified in the meta-tag (UTF-8) (note that this is the correct behavior, according to section 5.2.2 of the HTML 4.01 specification).

      This problem doesn't occur with other Moodle pages, since they all send a HTTP header with the character encoding (in addition to the encoding in the meta tag).

      The solution would be to add a php statement like "header('Content-type: text/html;'. current_charset()')" right after "include(config.php)" in all popups inside /lib/editor/htmlarea/popups.

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              monnardj Jacques Monnard
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07