[wp-trac] [WordPress Trac] #17977: Allow rel attributes on links in KSES
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 10 16:19:56 UTC 2012
#17977: Allow rel attributes on links in KSES
----------------------------------------------+--------------------------
Reporter: joostdevalk | Owner: joostdevalk
Type: enhancement | Status: closed
Priority: normal | Milestone: 3.5
Component: Formatting | Version: 3.2
Severity: normal | Resolution: fixed
Keywords: has-patch dev-feedback 3.4-early |
----------------------------------------------+--------------------------
Changes (by ryan):
* status: new => closed
* resolution: => fixed
Comment:
In [21790]:
{{{
#!CommitTicketReference repository="" revision="21790"
* Introduce wp_kses_allowed_html() which accepts a context string and
returns an array of allowed tags.
* Remove explicit declarations of class, id, style, and title from
$allowedposttags
* Dynamicallly add global attributes to every tag for the 'post' context
* No longer calls wp_kses_array_lc() every time wp_kses() runs. Instead
it runs once if CUSTOM_TAGS is true. Plugins directly passing a custom
allowed_html array will no longer get the lc treatment. Keep an eye out
for problems with this.
* wp_kses_data() and wp_filter_kses() pass current_filter() for the
$allowed_html argument to wp_kses().
* wp_kses_allowed_html() handles being passed a filter name for a
context. If the filter is not a recognized one it defaults to using
$allowedtags as was done before for wp_kses_data() and wp_filter_kses().
* wp_kses_allowed_html() recognizes user_description and
pre_user_description out of the box. For these it takes $allowedtags and
inserts rel attribute support.
* wp_kses_allowed_html() allows plugins to override the return values for
the default contexts and support arbitrary contexts via a
wp_kses_allowed_html filter.
* wp_kses_hook() can now pass a string context for $allowed_html to the
pre_kses filter. We might have to pass the result of
wp_kses_allowed_html() instead if it turns out that plugins are digging in
$allowed_html.
fixes #17977
see #20210
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17977#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list