WordPress.org

Make WordPress Core

Opened 2 years ago

#40606 new defect (bug)

wp_filter_nohtml_kses escaping single quotes even when no HTML tags are being used in the string

Reported by: samuelaguilera Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

According to Codex wp_filter_nohtml_kses( $data ) should only strip all of the HTML in the content. But it also escapes single quotes in plain text.

Example:

<?php
        $filtered_string = wp_filter_nohtml_kses(  "You're not allowed to do this!" );
        echo $filtered_string;

The above will output:

You\'re not allowed to do this!

Change History (0)

Note: See TracTickets for help on using tickets.