KSES: Allow the `download` attribute on `<a>` tags.

To avoid this being a vector for bypassing the filetypes that are allowed to be uploaded, this attribute is only allowed to be added without a value.

Merges [43813] from the 5.0 branch to trunk.

Props kalpshit, arshidkv12, welcher, peterwilsoncc, marina_wp, pento.
Fixes #44724.


Built from https://develop.svn.wordpress.org/trunk@44156


git-svn-id: http://core.svn.wordpress.org/trunk@43986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2018-12-14 03:28:38 +00:00
parent 9c8a29c889
commit e740c695e6
2 changed files with 9 additions and 6 deletions

View File

@ -61,11 +61,14 @@ if ( ! CUSTOM_TAGS ) {
$allowedposttags = array(
'address' => array(),
'a' => array(
'href' => true,
'rel' => true,
'rev' => true,
'name' => true,
'target' => true,
'href' => true,
'rel' => true,
'rev' => true,
'name' => true,
'target' => true,
'download' => array(
'valueless' => 'y',
),
),
'abbr' => array(),
'acronym' => array(),

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.1-alpha-44155';
$wp_version = '5.1-alpha-44156';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.