Make WordPress Core


Ignore:
Timestamp:
06/24/2024 03:17:32 PM (20 months ago)
Author:
audrasjb
Message:

Grouped Backports to the 6.0 branch.

  • Editor: Fix Path Traversal issue on Windows in Template-Part Block.
  • Editor: Sanitize Template Part HTML tag on save.

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

File:
1 edited

Legend:

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

    r55773 r58481  
    46974697 *
    46984698 * @since 2.5.0
     4699 * @since 6.5.5 Allow hyphens in tag names (i.e. custom elements).
    46994700 *
    47004701 * @param string $tag_name
     
    47024703 */
    47034704function tag_escape( $tag_name ) {
    4704     $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9_:]/', '', $tag_name ) );
     4705    $safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
    47054706    /**
    47064707     * Filters a string cleaned and escaped for output as an HTML tag.
Note: See TracChangeset for help on using the changeset viewer.