Escape smiley URL in translate_smiley().
props simonwheatley. fixes #25529. git-svn-id: https://develop.svn.wordpress.org/trunk@26487 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
161b855638
commit
489808c35d
@ -1862,7 +1862,6 @@ function translate_smiley( $matches ) {
|
||||
|
||||
$smiley = trim( reset( $matches ) );
|
||||
$img = $wpsmiliestrans[ $smiley ];
|
||||
$smiley_masked = esc_attr( $smiley );
|
||||
|
||||
/**
|
||||
* Filter the Smiley image URL before it's used in the image element.
|
||||
@ -1875,7 +1874,7 @@ function translate_smiley( $matches ) {
|
||||
*/
|
||||
$src_url = apply_filters( 'smilies_src', includes_url( "images/smilies/$img" ), $img, site_url() );
|
||||
|
||||
return " <img src='$src_url' alt='$smiley_masked' class='wp-smiley' /> ";
|
||||
return sprintf( ' <img src="%s" alt="%s" class="wp-smiley" /> ', esc_url( $src_url ), esc_attr( $smiley ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user