Encode quotes and chevrons in the HTML editor version of the generated captions too. Fixes #15343.
git-svn-id: https://develop.svn.wordpress.org/trunk@16236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
baaf0585dd
commit
73c3aa15f5
@ -140,6 +140,11 @@ function image_add_caption( $html, $id, $caption, $title, $align, $url, $size, $
|
||||
|
||||
$width = $matches[1];
|
||||
|
||||
$caption = str_replace( array( '>', '<', '"', "'" ),
|
||||
array( '>', '<', '"', ''' ),
|
||||
$caption
|
||||
);
|
||||
|
||||
$html = preg_replace( '/(class=["\'][^\'"]*)align(none|left|right|center)\s?/', '$1', $html );
|
||||
if ( empty($align) )
|
||||
$align = 'none';
|
||||
|
Loading…
Reference in New Issue
Block a user