From 2d19a3b446774b459cbf36e8191a50518e4ce11c Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sun, 1 Mar 2015 23:28:00 +0000 Subject: [PATCH] PressThis: - Replace all `%1$s` and `%2$s` in suggestedHTML in case plugins repeat them. - Fix docs typo, props kraftbj. See #31373. git-svn-id: https://develop.svn.wordpress.org/trunk@31596 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-press-this.php | 2 +- src/wp-admin/js/press-this.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 1ca2ce2ff9..7151a0cb1f 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/wp-admin/includes/class-wp-press-this.php @@ -60,7 +60,7 @@ class WP_Press_This { } /** - * Get the sources images and save them locally, fr posterity, unless we can't. + * Get the source's images and save them locally, for posterity, unless we can't. * * @since 4.2.0 * @access public diff --git a/src/wp-admin/js/press-this.js b/src/wp-admin/js/press-this.js index d718abcf2d..e2d63ea37d 100644 --- a/src/wp-admin/js/press-this.js +++ b/src/wp-admin/js/press-this.js @@ -208,7 +208,7 @@ // Add a source attribution if there is one available. if ( url && siteConfig.suggestedHTML && ( ( title && __( 'newPost' ) !== title ) || siteName ) ) { - content += siteConfig.suggestedHTML.replace( '%1$s', encodeURI( url ) ).replace( '%2$s', ( title || siteName ) ); + content += siteConfig.suggestedHTML.replace( /%1\$s/g, encodeURI( url ) ).replace( /%2\$s/g, ( title || siteName ) ); } return content || '';