Make WordPress Core


Ignore:
Timestamp:
06/18/2015 09:59:10 PM (9 years ago)
Author:
wonderboymusic
Message:

Since PHP 5.2.3, the htmlspecialchars() function has an optional $double_encode parameter, which we can now use. This will save us a few expensive kses/html decoding calls.

Adds unit tests.

Props miqrogroove.
Fixes #17780.

File:
1 edited

Legend:

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

    r25002 r32850  
    2727
    2828    function test_esc_attr_amp() {
    29         $out = esc_attr( 'foo & bar &baz; '' );
    30         $this->assertEquals( "foo & bar &baz; '", $out );
     29        $out = esc_attr( 'foo & bar &baz;  ' );
     30        $this->assertEquals( "foo & bar &baz;  ", $out );
    3131    }
    3232}
Note: See TracChangeset for help on using the changeset viewer.