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

weblib.php breaks upper-case hex Numeric Character References

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8
    • Component/s: Course
    • Labels:
      None
    • Environment:
      Moodle 1.8, PHP 5.1.4, PostgreSQL 8.1.4 on RedHat Linux.
    • Database:
      PostgreSQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE

      Description

      Function format_string in lib/weblib.php has a regexp for converting lone ampersands to & It is designed to ignore HTML entities and NCR's, if these are used to represent foreign characters, but it does not ignore hex NCR's where the hex alpha characters are upper case. However, it appears that hex NCR's are allowed to be case-insensitive (http://www.w3.org/International/questions/qa-escapes).

      I attach a patch to allow the regexp to ignore hex NCR's with upper case alpha characters, and hope that this is of use.

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              garethmorgan Gareth Morgan
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

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