WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/25/2019 12:04:28 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Formatting: Don't run wp_targeted_link_rel() on entirely serialized content.

Props birgire, elliotcondon.
Fixes #46402.

File:
1 edited

Legend:

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

    r45348 r45408  
    128128        $this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
    129129    }
     130
     131    /**
     132     * Ensure entirely serialized content is ignored.
     133     *
     134     * @ticket 46402.
     135     */
     136    public function test_ignore_entirely_serialized_content() {
     137        $content  = 'a:1:{s:4:"html";s:52:"<p>Links: <a href="/" target="_blank">No Rel</a></p>";}';
     138        $expected = 'a:1:{s:4:"html";s:52:"<p>Links: <a href="/" target="_blank">No Rel</a></p>";}';
     139        $this->assertEquals( $expected, wp_targeted_link_rel( $content ) );
     140    }
     141
    130142}
Note: See TracChangeset for help on using the changeset viewer.