Make WordPress Core

Changeset 31596


Ignore:
Timestamp:
03/01/2015 11:28:00 PM (10 years ago)
Author:
azaozz
Message:

PressThis:

  • Replace all %1$s and %2$s in suggestedHTML in case plugins repeat them.
  • Fix docs typo, props kraftbj.

See #31373.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r31595 r31596  
    6161
    6262    /**
    63      * Get the sources images and save them locally, fr posterity, unless we can't.
     63     * Get the source's images and save them locally, for posterity, unless we can't.
    6464     *
    6565     * @since 4.2.0
  • trunk/src/wp-admin/js/press-this.js

    r31595 r31596  
    209209            // Add a source attribution if there is one available.
    210210            if ( url && siteConfig.suggestedHTML && ( ( title && __( 'newPost' ) !== title ) || siteName ) ) {
    211                 content += siteConfig.suggestedHTML.replace( '%1$s', encodeURI( url ) ).replace( '%2$s', ( title || siteName ) );
     211                content += siteConfig.suggestedHTML.replace( /%1\$s/g, encodeURI( url ) ).replace( /%2\$s/g, ( title || siteName ) );
    212212            }
    213213
Note: See TracChangeset for help on using the changeset viewer.