Make WordPress Core


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

Grouped Backports to the 6.2 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.2 branch.
Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz, dmsnell, gziolo.

File:
1 edited

Legend:

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

    r55765 r58479  
    47214721 *
    47224722 * @since 2.5.0
     4723 * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements).
    47234724 *
    47244725 * @param string $tag_name
     
    47264727 */
    47274728function tag_escape( $tag_name ) {
    4728     $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) );
     4729    $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
    47294730    /**
    47304731     * Filters a string cleaned and escaped for output as an HTML tag.
Note: See TracChangeset for help on using the changeset viewer.