Make WordPress Core


Ignore:
Timestamp:
11/19/2015 11:31:00 PM (11 years ago)
Author:
pento
Message:

Texturize: Only convert & to & within text nodes.

Previously, & would be converted everywhere, which caused problems when it was converted within a <script>, for example.

convert_chars() is now removed from the the_content filter, as it was doing the same job as wptexturize().

KSES correctly handles converting & within HTML attributes, so there's no need for wptexturize() and convert_chars() to do the same job.

Fixes #34698.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/WPTexturize.php

    r34761 r35709  
    12681268                        ),
    12691269                        array(
    1270                                 '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]',
    1271                                 '[ photos by <a href="http://example.com/?a[]=1&#038;a[]=2"> this guy </a> ]',
    1272                         ),
    1273                         array(
    1274                                 '[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a>]',
    1275                                 '[photos by <a href="http://example.com/?a[]=1&#038;a[]=2"> this guy </a>]',
     1270                                '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy & that guy </a> ]',
     1271                                '[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy &#038; that guy </a> ]',
     1272                        ),
     1273                        array(
     1274                                '[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy & that guy </a>]',
     1275                                '[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy &#038; that guy </a>]',
    12761276                        ),
    12771277                        array(
Note: See TracChangeset for help on using the changeset viewer.