mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-20 19:56:49 +01:00
Formatting: Preserve target="_blank" in Biographical Info and Category Description.
This changeset ensures the `target="_blank"` attribute is preserved when adding links in the Biographical Info and Category Description fields. Previously, this attribute was being stripped by the KSES sanitization process. Additionally, new unit tests have been added to verify the preservation of the `target="_blank"` attribute in these specific contexts. Props lovewpmu, miqrogroove, bsutcliffe, sjefen6, nofearinc, nacin, harmr, blogitsolutions, stefahn, nirajgirixd, martinkrcho, spacedmonkey, sukhendu2002, audrasjb, gaellebesson, nuryko, guillaumeturpin, maximemeganck, ranafge, azaozz, joedolson, rinkalpagdar, mikinc860. Fixes #12056. Built from https://develop.svn.wordpress.org/trunk@59677 git-svn-id: http://core.svn.wordpress.org/trunk@59020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c84a324ab2
commit
a79b4ef4c9
|
|
@ -895,9 +895,11 @@ function wp_kses_allowed_html( $context = '' ) {
|
|||
return $tags;
|
||||
|
||||
case 'user_description':
|
||||
case 'pre_term_description':
|
||||
case 'pre_user_description':
|
||||
$tags = $allowedtags;
|
||||
$tags['a']['rel'] = true;
|
||||
$tags = $allowedtags;
|
||||
$tags['a']['rel'] = true;
|
||||
$tags['a']['target'] = true;
|
||||
/** This filter is documented in wp-includes/kses.php */
|
||||
return apply_filters( 'wp_kses_allowed_html', $tags, $context );
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59676';
|
||||
$wp_version = '6.8-alpha-59677';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user