Skip to content

Commit f11aeb2

Browse files
Add decoding and fetchpriority to img allowed attrs
These performance attributes are commonly added by WordPress core (wp_img_tag_add_loading_optimization_attrs) and should not be stripped when content passes through KSES filtering.
1 parent 0068aac commit f11aeb2

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

src/wp-includes/kses.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,19 +210,21 @@
210210
),
211211
'i' => array(),
212212
'img' => array(
213-
'alt' => true,
214-
'align' => true,
215-
'border' => true,
216-
'height' => true,
217-
'hspace' => true,
218-
'loading' => true,
219-
'longdesc' => true,
220-
'vspace' => true,
221-
'src' => true,
222-
'srcset' => true,
223-
'usemap' => true,
224-
'width' => true,
225-
'sizes' => true,
213+
'alt' => true,
214+
'align' => true,
215+
'border' => true,
216+
'decoding' => true,
217+
'fetchpriority' => true,
218+
'height' => true,
219+
'hspace' => true,
220+
'loading' => true,
221+
'longdesc' => true,
222+
'vspace' => true,
223+
'src' => true,
224+
'srcset' => true,
225+
'usemap' => true,
226+
'width' => true,
227+
'sizes' => true,
226228
),
227229
'ins' => array(
228230
'datetime' => true,

0 commit comments

Comments
 (0)