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

html_to_text destroys UTF-8 strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9.10
    • Fix Version/s: 1.9.11
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      html_to_text destroys UTF-8.

      Here is an example

      <?php
      require_once('config.php');
      header('Content-type: text/plain; charset=UTF-8');
      $htmlstring = "<p>Choose the correct answer for this occasion:</p><p><strong>How do you say you are sorry e.g.. at someone's misfortunes?</strong><strong></strong></p>";
      echo "Testing input to see if it is UTF-8: ", iconv("UTF-8", "UTF-8", $htmlstring);
      $textstring = html_to_text($htmlstring);
      echo "Testing output to see if it is UTF-8: ", iconv("UTF-8", "UTF-8", $textstring);

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              21/Feb/11