Make WordPress Core


Ignore:
Timestamp:
06/24/2024 03:02:41 PM (6 months ago)
Author:
audrasjb
Message:

Grouped Backports to the 6.5 branch.

  • Editor: Fix Path Traversal issue on Windows in Template-Part Block.
  • Editor: Sanitize Template Part HTML tag on save.
  • HTML API: Run URL attributes through esc_url().

Merges [58470], [58471], [58472] and [58473] to the 6.5 branch.
Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz, dmsnell, gziolo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.5/src/wp-includes/formatting.php

    r57626 r58474  
    48034803 *
    48044804 * @since 2.5.0
     4805 * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements).
    48054806 *
    48064807 * @param string $tag_name
     
    48084809 */
    48094810function tag_escape( $tag_name ) {
    4810     $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) );
     4811    $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
    48114812    /**
    48124813     * Filters a string cleaned and escaped for output as an HTML tag.
Note: See TracChangeset for help on using the changeset viewer.