Making WordPress.org


Ignore:
Timestamp:
02/07/2024 05:59:24 AM (2 years ago)
Author:
dd32
Message:

Trac: Treat the output files as UTF-8, to ensure that unicode characters are not escaped improperly. See [12949].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/trac.wordpress.org/templates/update-headers.php

    r13181 r13182  
    2828    $doc->loadHTML( $html );
    2929
     30    // Ensure it's treated as UTF-8, It should already be detected as such, but this is just in case.
     31    $doc->encoding = 'utf-8';
     32
    3033    return $doc;
    3134}
     
    3740    $doc->loadHTML( '<!DOCTYPE html>
    3841    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/" py:strip=""></html>' );
     42
     43    // Set the encoding to UTF-8 to allow unicode characters in the output. This avoids them being escaped.
     44    $doc->encoding = 'utf-8';
    3945
    4046    return $doc;
Note: See TracChangeset for help on using the changeset viewer.