From 489808c35dd0c217b626d1a3e014c1254b729432 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 30 Nov 2013 22:38:46 +0000 Subject: [PATCH] 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 --- src/wp-includes/formatting.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index c0ebf6b596..c0e0c81a91 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -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 " $smiley_masked "; + return sprintf( ' %s ', esc_url( $src_url ), esc_attr( $smiley ) ); } /**