Make WordPress Core

Changeset 58473


Ignore:
Timestamp:
06/24/2024 02:55:32 PM (8 months ago)
Author:
audrasjb
Message:

HTML API: Code improvements following [58472].

Props xknown, jorbin.
Unprops audrasjb.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php

    r58472 r58473  
    29812981             * @see https://html.spec.whatwg.org/#attributes-3
    29822982             */
    2983             $escaped_new_value = esc_attr( $value );
    2984             $updated_attribute = wp_kses_one_attr( "{$comparable_name}=\"{$escaped_new_value}\"", $tag_name );
     2983            $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes() ) ? esc_url( $value ) : esc_attr( $value );
     2984            $updated_attribute = "{$name}=\"{$escaped_new_value}\"";
    29852985        }
    29862986
Note: See TracChangeset for help on using the changeset viewer.