Make WordPress Core


Ignore:
Timestamp:
08/30/2022 03:50:37 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Grouped backports to the 4.3 branch.

  • Posts, Post Types: Escape output within the_meta().
  • General: Ensure bookmark query limits are numeric.
  • Plugins: Escape output in error messages.

Merges [53958-53960] to the 4.3 branch.
Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs.

Location:
branches/4.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.3

  • branches/4.3/src/wp-includes/post-template.php

    r45959 r53980  
    939939 * Display list of post custom fields.
    940940 *
    941  * @internal This will probably change at some point...
    942941 * @since 1.2.0
     942 *
     943 * @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
    943944 */
    944945function the_meta() {
     946        _deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
    945947        if ( $keys = get_post_custom_keys() ) {
    946948                echo "<ul class='post-meta'>\n";
    … …  
    961963                         * @param string $value Meta value.
    962964                         */
    963                         echo apply_filters( 'the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value );
     965                        echo apply_filters( 'the_meta_key', "<li><span class='post-meta-key'>" . esc_html( $key ) . ":</span>" . esc_html( $value ) . "</li>\n", $key, $value );
    964966                }
    965967                echo "</ul>\n";
Note: See TracChangeset for help on using the changeset viewer.