diff --git a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php index d73561843bcb2..d9cf45fff8129 100644 --- a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php +++ b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php @@ -31,8 +31,8 @@ * @access private * @ignore * - * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements * @see WP_HTML_Processor + * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements */ class WP_HTML_Active_Formatting_Elements { /** @@ -95,7 +95,7 @@ public function current_node() { * > formatting from "leaking" into applet, object, marquee, template, * > td, th, and caption elements. * - * @see https://html.spec.whatwg.org/#concept-parser-marker + * @link https://html.spec.whatwg.org/#concept-parser-marker * * @since 6.7.0 */ @@ -108,7 +108,7 @@ public function insert_marker(): void { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements + * @link https://html.spec.whatwg.org/#push-onto-the-list-of-active-formatting-elements * * @param WP_HTML_Token $token Push this node onto the stack. */ @@ -215,7 +215,7 @@ public function walk_up() { * > The list has been cleared up to the last marker. * > 4. Go to step 1. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-decoder.php b/src/wp-includes/html-api/class-wp-html-decoder.php index 31ed56808e324..4709aa615d465 100644 --- a/src/wp-includes/html-api/class-wp-html-decoder.php +++ b/src/wp-includes/html-api/class-wp-html-decoder.php @@ -345,7 +345,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * This comment is here to note and explain why there's no check to * remove these characters or replace them. * - * @see https://infra.spec.whatwg.org/#noncharacter + * @link https://infra.spec.whatwg.org/#noncharacter */ /* @@ -456,8 +456,8 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * `/?random&degree&gt=0&lt=360&not=90` produces the intended * value regardless of the following character.) * - * @see https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state - * @see https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references + * @link https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state + * @link https://html.spec.whatwg.org/multipage/named-characters.html#named-character-references */ if ( 'attribute' !== $context || ';' === $text[ $after_name - 1 ] || $after_name >= $length ) { $match_byte_length = $after_name - $at; @@ -494,7 +494,7 @@ public static function read_character_reference( $context, $text, $at = 0, &$mat * * @since 6.6.0 * - * @see https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. + * @link https://www.rfc-editor.org/rfc/rfc3629 For the UTF-8 standard. * * @param int $code_point Which code point to convert. * @return string Converted code point, or `�` if invalid. diff --git a/src/wp-includes/html-api/class-wp-html-doctype-info.php b/src/wp-includes/html-api/class-wp-html-doctype-info.php index ce6004a940cf3..84be2a028697b 100644 --- a/src/wp-includes/html-api/class-wp-html-doctype-info.php +++ b/src/wp-includes/html-api/class-wp-html-doctype-info.php @@ -27,27 +27,25 @@ * they match only when byte-for-byte identical (no-quirks mode). * * All HTML documents should start with the standard HTML5 DOCTYPE: ``. + * The {@link https://html.spec.whatwg.org/#the-doctype HTML Standard} explains why: * * > DOCTYPEs are required for legacy reasons. When omitted, browsers tend to use a different * > rendering mode that is incompatible with some specifications. Including the DOCTYPE in a * > document ensures that the browser makes a best-effort attempt at following the * > relevant specifications. * - * @see https://html.spec.whatwg.org/#the-doctype - * * DOCTYPE declarations comprise four properties: a name, public identifier, system identifier, * and an indication of which document compatibility mode they would imply if an HTML parser - * hadn't already determined it from other information. - * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * hadn't already determined it from other information. The HTML parser's + * {@link https://html.spec.whatwg.org/#the-initial-insertion-mode initial insertion mode} + * defines which compatibility mode a DOCTYPE declaration implies. * - * Historically, the DOCTYPE declaration was used in SGML documents to instruct a parser how + * Historically, the DOCTYPE declaration was used in + * {@link https://www.iso.org/standard/16387.html SGML documents} to instruct a parser how * to interpret the various tags and entities within a document. Its role in HTML diverged * from how it was used in SGML and no meaning should be back-read into HTML based on how it * is used in SGML, XML, or XHTML documents. * - * @see https://www.iso.org/standard/16387.html - * * @since 6.7.0 * @since 7.1.0 Spec update: missing and empty SYSTEM identifiers are handled * the same for determining the document mode. @@ -67,7 +65,7 @@ class WP_HTML_Doctype_Info { * * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -91,7 +89,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -121,7 +119,7 @@ class WP_HTML_Doctype_Info { * │ │ ╰─── public identifier ─────╯ ╰──── system identifier ────╯ * ╰──┴── name is "html". * - * @see https://html.spec.whatwg.org/#tokenization + * @link https://html.spec.whatwg.org/#tokenization * * @since 6.7.0 * @@ -149,7 +147,7 @@ class WP_HTML_Doctype_Info { * before the HTML element has been opened and before finding any other * DOCTYPE declaration tokens. * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @since 6.7.0 * @@ -171,7 +169,7 @@ class WP_HTML_Doctype_Info { * > and system identifier must be marked as missing (which is a distinct state from the * > empty string), and the force-quirks flag must be set to off (its other state is on). * - * @see https://html.spec.whatwg.org/multipage/parsing.html#tokenization + * @link https://html.spec.whatwg.org/multipage/parsing.html#tokenization * * @since 6.7.0 * @@ -424,7 +422,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * This parser combines the rules for parsing DOCTYPE tokens found in the HTML * specification for the DOCTYPE related tokenizer states. * - * @see https://html.spec.whatwg.org/#doctype-state + * @link https://html.spec.whatwg.org/#doctype-state */ /* @@ -449,8 +447,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { /* * Perform newline normalization and ensure the $end value is correct after normalization. * - * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @see https://infra.spec.whatwg.org/#normalize-newlines + * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @link https://infra.spec.whatwg.org/#normalize-newlines */ $doctype_html = str_replace( "\r\n", "\n", $doctype_html ); $doctype_html = str_replace( "\r", "\n", $doctype_html ); @@ -479,7 +477,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Parsing effectively begins in "Before DOCTYPE name state". Ignore whitespace and * proceed to the next state. * - * @see https://html.spec.whatwg.org/#before-doctype-name-state + * @link https://html.spec.whatwg.org/#before-doctype-name-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at ); @@ -502,7 +500,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * Find a case-insensitive match for "PUBLIC" or "SYSTEM" at this point. * Otherwise, set force-quirks and enter bogus DOCTYPE state (skip the rest of the doctype). * - * @see https://html.spec.whatwg.org/#after-doctype-name-state + * @link https://html.spec.whatwg.org/#after-doctype-name-state */ if ( $at + 6 >= $end ) { return new self( $doctype_name, $doctype_public_id, $doctype_system_id, true ); @@ -549,8 +547,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE public identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @see https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state - * @see https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-public-identifier-(double-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-public-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; @@ -579,7 +577,7 @@ public static function from_doctype_token( string $doctype_html ): ?self { * * Advance through whitespace between public and system identifiers. * - * @see https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state + * @link https://html.spec.whatwg.org/#between-doctype-public-and-system-identifiers-state */ $at += strspn( $doctype_html, " \t\n\f\r", $at, $end - $at ); if ( $at >= $end ) { @@ -592,8 +590,8 @@ public static function from_doctype_token( string $doctype_html ): ?self { * "DOCTYPE system identifier (single-quoted) state" by finding one of the valid quotes. * Anything else forces quirks mode and ignores the rest of the contents. * - * @see https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state - * @see https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-system-identifier-(double-quoted)-state + * @link https://html.spec.whatwg.org/#doctype-system-identifier-(single-quoted)-state */ $closer_quote = $doctype_html[ $at ]; diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index af0d6ef508795..4472ff14a3e4a 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -25,8 +25,8 @@ * @access private * @ignore * - * @see https://html.spec.whatwg.org/#stack-of-open-elements * @see WP_HTML_Processor + * @link https://html.spec.whatwg.org/#stack-of-open-elements */ class WP_HTML_Open_Elements { /** @@ -235,7 +235,7 @@ public function current_node_is( string $identity ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-the-specific-scope * * @param string $tag_name Name of tag check. * @param string[] $termination_list List of elements that terminate the search. @@ -296,7 +296,7 @@ public function has_element_in_specific_scope( string $tag_name, $termination_li * @since 6.4.0 * @since 6.7.0 Full support. * - * @see https://html.spec.whatwg.org/#has-an-element-in-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -345,7 +345,7 @@ public function has_element_in_scope( string $tag_name ): bool { * @since 6.5.0 Implemented: no longer throws on every invocation. * @since 6.7.0 Supports all required HTML elements. * - * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-list-item-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -395,7 +395,7 @@ public function has_element_in_list_item_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Supports all required HTML elements. * - * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -444,7 +444,7 @@ public function has_element_in_button_scope( string $tag_name ): bool { * @since 6.4.0 * @since 6.7.0 Full implementation. * - * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-table-scope * * @param string $tag_name Name of tag to check. * @return bool Whether given element is in scope. @@ -491,7 +491,7 @@ public function has_element_in_select_scope( string $tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope + * @link https://html.spec.whatwg.org/#has-an-element-in-button-scope * * @return bool Whether a P is in BUTTON scope. */ @@ -504,7 +504,7 @@ public function has_p_in_button_scope(): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @return bool Whether a node was popped off of the stack. */ @@ -556,7 +556,7 @@ public function pop_until( string $html_tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @param WP_HTML_Token $stack_item Item to add onto stack. */ @@ -774,7 +774,7 @@ public function after_element_pop( WP_HTML_Token $item ): void { * > that the UA must, while the current node is not a table, template, or html element, pop * > elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-context * * @since 6.7.0 */ @@ -798,7 +798,7 @@ public function clear_to_table_context(): void { * > means that the UA must, while the current node is not a tbody, tfoot, thead, template, or * > html element, pop elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-body-context * * @since 6.7.0 */ @@ -824,7 +824,7 @@ public function clear_to_table_body_context(): void { * > means that the UA must, while the current node is not a tr, template, or html element, pop * > elements from the stack of open elements. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context + * @link https://html.spec.whatwg.org/multipage/parsing.html#clear-the-stack-back-to-a-table-row-context * * @since 6.7.0 */ diff --git a/src/wp-includes/html-api/class-wp-html-processor-state.php b/src/wp-includes/html-api/class-wp-html-processor-state.php index d1b3526a9cc79..05819d03c3a4d 100644 --- a/src/wp-includes/html-api/class-wp-html-processor-state.php +++ b/src/wp-includes/html-api/class-wp-html-processor-state.php @@ -33,7 +33,7 @@ class WP_HTML_Processor_State { * is added to the parser for more modes, add them here * following the same naming and value pattern. * - * @see https://html.spec.whatwg.org/#the-insertion-mode + * @link https://html.spec.whatwg.org/#the-insertion-mode */ /** @@ -41,8 +41,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @var string */ @@ -53,8 +53,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @var string */ @@ -65,8 +65,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-beforehead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-beforehead * * @var string */ @@ -77,8 +77,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inhead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inhead * * @var string */ @@ -89,8 +89,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @var string */ @@ -101,8 +101,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterhead * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterhead * * @var string */ @@ -113,8 +113,8 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @var string */ @@ -125,8 +125,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intable * * @var string */ @@ -137,8 +137,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @var string */ @@ -149,8 +149,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @var string */ @@ -161,8 +161,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incolumngroup * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incolumngroup * * @var string */ @@ -173,8 +173,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intablebody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intablebody * * @var string */ @@ -185,8 +185,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inrow * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inrow * * @var string */ @@ -197,8 +197,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-incell * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-incell * * @var string */ @@ -237,8 +237,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @var string */ @@ -249,8 +249,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @var string */ @@ -261,8 +261,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @var string */ @@ -273,8 +273,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @var string */ @@ -285,8 +285,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @var string */ @@ -297,8 +297,8 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor_State::$insertion_mode + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @var string */ @@ -309,7 +309,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes + * @link https://html.spec.whatwg.org/#the-insertion-mode:stack-of-template-insertion-modes * * @var array */ @@ -322,7 +322,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#stack-of-open-elements + * @link https://html.spec.whatwg.org/#stack-of-open-elements * * @var WP_HTML_Open_Elements */ @@ -335,7 +335,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#list-of-active-formatting-elements + * @link https://html.spec.whatwg.org/#list-of-active-formatting-elements * * @var WP_HTML_Active_Formatting_Elements */ @@ -355,7 +355,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#insertion-mode + * @link https://html.spec.whatwg.org/#insertion-mode * * @var string */ @@ -408,7 +408,7 @@ class WP_HTML_Processor_State { * * @since 6.7.0 * - * @see https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer + * @link https://html.spec.whatwg.org/multipage/parsing.html#head-element-pointer * * @var WP_HTML_Token|null */ @@ -424,7 +424,7 @@ class WP_HTML_Processor_State { * * @todo This may be invalidated by a seek operation. * - * @see https://html.spec.whatwg.org/#form-element-pointer + * @link https://html.spec.whatwg.org/#form-element-pointer * * @since 6.7.0 * @@ -439,7 +439,7 @@ class WP_HTML_Processor_State { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#frameset-ok-flag + * @link https://html.spec.whatwg.org/#frameset-ok-flag * * @var bool */ diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 7f871ec9e6628..4cadb962dd9d7 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -475,7 +475,7 @@ function ( WP_HTML_Token $token ): void { * fragment. Special care must be taken when processing fragments that are expected to appear * in specific contexts. SVG and TABLE are good examples, but there are others. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm + * @link https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm * * @since 6.8.0 * @@ -1496,7 +1496,7 @@ public function serialize_token(): string { * > that token and move on to the next one. (Newlines at the start of pre blocks * > are ignored as an authoring convenience.) * - * @see https://html.spec.whatwg.org/multipage/parsing.html + * @link https://html.spec.whatwg.org/multipage/parsing.html */ if ( $in_html && ( 'TEXTAREA' === $tag_name || 'PRE' === $tag_name || 'LISTING' === $tag_name ) ) { $html .= "\n"; @@ -1563,8 +1563,8 @@ private static function escape_text_for_serialization( string $text ): string { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-initial-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-initial-insertion-mode * * @return bool Whether an element was found. */ @@ -1636,8 +1636,8 @@ private function step_initial(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-before-html-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-before-html-insertion-mode * * @return bool Whether an element was found. */ @@ -1734,8 +1734,8 @@ private function step_before_html(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-before-head-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-before-head-insertion-mode * * @return bool Whether an element was found. */ @@ -1832,8 +1832,8 @@ private function step_before_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inhead * * @return bool Whether an element was found. */ @@ -2055,8 +2055,8 @@ private function step_in_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inheadnoscript * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inheadnoscript * * @return bool Whether an element was found. */ @@ -2159,8 +2159,8 @@ private function step_in_head_noscript(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-head-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-head-insertion-mode * * @return bool Whether an element was found. */ @@ -2304,8 +2304,8 @@ private function step_after_head(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3370,8 +3370,8 @@ private function step_in_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody * @see WP_HTML_Processor::step_in_body + * @link https://html.spec.whatwg.org/#parsing-main-inbody * * @return bool Whether an element was found. */ @@ -3422,8 +3422,8 @@ private function in_body_any_other_end_tag(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intable * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intable * * @return bool Whether an element was found. */ @@ -3476,7 +3476,7 @@ private function step_in_table(): bool { * > Otherwise, insert the characters given by the pending table * > character tokens list. * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext + * @link https://html.spec.whatwg.org/#parsing-main-intabletext */ if ( parent::TEXT_IS_WHITESPACE === $this->text_node_classification ) { $this->insert_html_element( $this->state->current_token ); @@ -3680,8 +3680,8 @@ private function step_in_table(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intabletext * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intabletext * * @return bool Whether an element was found. */ @@ -3700,8 +3700,8 @@ private function step_in_table_text(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-incaption * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-incaption * * @return bool Whether an element was found. */ @@ -3785,8 +3785,8 @@ private function step_in_caption(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-incolgroup * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-incolgroup * * @return bool Whether an element was found. */ @@ -3894,8 +3894,8 @@ private function step_in_column_group(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intbody * * @return bool Whether an element was found. */ @@ -3998,8 +3998,8 @@ private function step_in_table_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intr * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intr * * @return bool Whether an element was found. */ @@ -4109,8 +4109,8 @@ private function step_in_row(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intd * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intd * * @return bool Whether an element was found. */ @@ -4214,8 +4214,8 @@ private function step_in_cell(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-intemplate * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-intemplate * * @return bool Whether an element was found. */ @@ -4346,8 +4346,8 @@ private function step_in_template(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-afterbody * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-afterbody * * @return bool Whether an element was found. */ @@ -4437,8 +4437,8 @@ private function step_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inframeset * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inframeset * * @return bool Whether an element was found. */ @@ -4559,8 +4559,8 @@ private function step_in_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-afterframeset * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-afterframeset * * @return bool Whether an element was found. */ @@ -4647,8 +4647,8 @@ private function step_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-after-body-insertion-mode * * @return bool Whether an element was found. */ @@ -4712,8 +4712,8 @@ private function step_after_after_body(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#the-after-after-frameset-insertion-mode * * @return bool Whether an element was found. */ @@ -4783,8 +4783,8 @@ private function step_after_after_frameset(): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#parsing-main-inforeign * @see WP_HTML_Processor::step + * @link https://html.spec.whatwg.org/#parsing-main-inforeign * * @return bool Whether an element was found. */ @@ -5362,7 +5362,7 @@ public function remove_attribute( $name ): bool { * * @since 6.6.0 Subclassed for the HTML Processor. * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -5762,7 +5762,7 @@ public function has_bookmark( $bookmark_name ): bool { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#close-a-p-element + * @link https://html.spec.whatwg.org/#close-a-p-element */ private function close_a_p_element(): void { $this->generate_implied_end_tags( 'P' ); @@ -5776,7 +5776,7 @@ private function close_a_p_element(): void { * @since 6.7.0 Full spec support. * @ignore * - * @see https://html.spec.whatwg.org/#generate-implied-end-tags + * @link https://html.spec.whatwg.org/#generate-implied-end-tags * * @param string|null $except_for_this_element Perform as if this element doesn't exist in the stack of open elements. */ @@ -5815,7 +5815,7 @@ private function generate_implied_end_tags( ?string $except_for_this_element = n * @ignore * * @see WP_HTML_Processor::generate_implied_end_tags - * @see https://html.spec.whatwg.org/#generate-implied-end-tags + * @link https://html.spec.whatwg.org/#generate-implied-end-tags */ private function generate_implied_end_tags_thoroughly(): void { $elements_with_implied_end_tags = array( @@ -5852,7 +5852,7 @@ private function generate_implied_end_tags_thoroughly(): void { * > has only one element in it (fragment case); otherwise, the adjusted current * > node is the current node. * - * @see https://html.spec.whatwg.org/#adjusted-current-node + * @link https://html.spec.whatwg.org/#adjusted-current-node * * @since 6.7.0 * @ignore @@ -5879,7 +5879,7 @@ private function get_adjusted_current_node(): ?WP_HTML_Token { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements + * @link https://html.spec.whatwg.org/#reconstruct-the-active-formatting-elements * * @return bool Whether any formatting elements needed to be reconstructed. */ @@ -5920,7 +5920,7 @@ private function reconstruct_active_formatting_elements(): bool { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately + * @link https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately */ private function reset_insertion_mode_appropriately(): void { // Set the first node. @@ -6076,7 +6076,7 @@ private function reset_insertion_mode_appropriately(): void { * * @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input. * - * @see https://html.spec.whatwg.org/#adoption-agency-algorithm + * @link https://html.spec.whatwg.org/#adoption-agency-algorithm */ private function run_adoption_agency_algorithm(): void { $budget = 1000; @@ -6187,7 +6187,7 @@ private function run_adoption_agency_algorithm(): void { * > 4. Clear the list of active formatting elements up to the last marker. * > 5. Switch the insertion mode to "in row". * - * @see https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell + * @link https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell * * @since 6.7.0 * @ignore @@ -6211,7 +6211,7 @@ private function close_cell(): void { * @since 6.4.0 * @ignore * - * @see https://html.spec.whatwg.org/#insert-a-foreign-element + * @link https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Name of bookmark pointing to element in original input HTML. */ @@ -6225,7 +6225,7 @@ private function insert_html_element( WP_HTML_Token $token ): void { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#insert-a-foreign-element + * @link https://html.spec.whatwg.org/#insert-a-foreign-element * * @param WP_HTML_Token $token Insert this token. The token's namespace and * insertion point will be updated correctly. @@ -6252,7 +6252,7 @@ private function insert_foreign_element( WP_HTML_Token $token, bool $only_add_to * Here, there's no DOM node onto which the element will be appended, so the * parser will skip this step. * - * @see https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location + * @link https://html.spec.whatwg.org/#insert-an-element-at-the-adjusted-insertion-location */ } @@ -6293,7 +6293,7 @@ private function insert_virtual_node( $token_name, $bookmark_name = null ): WP_H * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#mathml-text-integration-point + * @link https://html.spec.whatwg.org/#mathml-text-integration-point * * @return bool Whether the current token is a MathML integration point. */ @@ -6330,7 +6330,7 @@ private function is_mathml_integration_point(): bool { * @since 6.7.0 * @ignore * - * @see https://html.spec.whatwg.org/#html-integration-point + * @link https://html.spec.whatwg.org/#html-integration-point * * @return bool Whether the current token is an HTML integration point. */ @@ -6378,7 +6378,7 @@ private function is_html_integration_point(): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#special + * @link https://html.spec.whatwg.org/#special * * @param WP_HTML_Token|string $tag_name Node to check, or only its name if in the HTML namespace. * @return bool Whether the element of the given name is in the special category. @@ -6499,7 +6499,7 @@ public static function is_special( $tag_name ): bool { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#void-elements + * @link https://html.spec.whatwg.org/#void-elements * * @param string $tag_name Name of HTML tag to check. * @return bool Whether the given tag is an HTML Void Element. @@ -6541,7 +6541,7 @@ public static function is_void( $tag_name ): bool { * null === self::get_encoding( 'UTF-7' ); * null === self::get_encoding( 'utf8; charset=' ); * - * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @link https://encoding.spec.whatwg.org/#concept-encoding-get * * @todo As this parser only supports UTF-8, only the UTF-8 * encodings are detected. Add more as desired, but the diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index afd4dca2c0e6a..3386cfac890dd 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1403,7 +1403,7 @@ public function release_bookmark( $name ): bool { * @since 6.3.2 * @ignore * - * @see https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm + * @link https://html.spec.whatwg.org/#generic-raw-text-element-parsing-algorithm * * @param string $tag_name The uppercase tag name which will close the RAWTEXT region. * @return bool Whether an end to the RAWTEXT region was found before the end of the document. @@ -1423,7 +1423,7 @@ private function skip_rawtext( string $tag_name ): bool { * @since 6.2.0 * @ignore * - * @see https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state + * @link https://html.spec.whatwg.org/multipage/parsing.html#rcdata-state * * @param string $tag_name The uppercase tag name which will close the RCDATA region. * @return bool Whether an end to the RCDATA region was found before the end of the document. @@ -1652,17 +1652,17 @@ private function skip_script_data(): bool { /** * These characters trigger state transitions of interest: * - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} - * - @see {https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-end-tag-name-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-escaped-end-tag-name-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-start-state} + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escape-end-state} * * The "\r" character is not present in the above references. However, "\r" must be * treated the same as "\n". This is because the HTML Standard requires newline * normalization during preprocessing which applies this replacement. * - * - @see https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream - * - @see https://infra.spec.whatwg.org/#normalize-newlines + * - {@link https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream} + * - {@link https://infra.spec.whatwg.org/#normalize-newlines} */ '>' !== $c && ' ' !== $c && @@ -1753,7 +1753,7 @@ private function parse_next_tag(): bool { * At this point the parser checks if this is one of those cases and if it is * will continue searching for the next "<" in search of a token boundary. * - * @see https://html.spec.whatwg.org/#tag-open-state + * @link https://html.spec.whatwg.org/#tag-open-state */ if ( 1 !== strspn( $html, '!/?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', $at + 1, 1 ) ) { ++$at; @@ -2131,7 +2131,7 @@ private function parse_next_tag(): bool { * [#x10000-#xEFFFF] * > NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] * - * @see https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget + * @link https://www.w3.org/TR/2006/REC-xml11-20060816/#NT-PITarget */ if ( $this->token_length >= 5 && '?' === $html[ $closer_at - 1 ] ) { $comment_text = substr( $html, $this->token_starts_at + 2, $this->token_length - 4 ); @@ -2244,7 +2244,7 @@ private function parse_next_attribute(): bool { * Treat the equal sign as a part of the attribute * name if it is the first encountered byte. * - * @see https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state + * @link https://html.spec.whatwg.org/multipage/parsing.html#before-attribute-name-state */ $name_length = '=' === $this->html[ $this->bytes_already_parsed ] ? 1 + strcspn( $this->html, "=/> \t\f\r\n", $this->bytes_already_parsed + 1 ) @@ -2321,12 +2321,12 @@ private function parse_next_attribute(): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * The tokenizer replaces U+0000 NULL bytes in * attribute names with U+FFFD. * - * @see https://html.spec.whatwg.org/#attribute-name-state + * @link https://html.spec.whatwg.org/#attribute-name-state */ $comparable_name = strtolower( str_replace( "\x00", "\u{FFFD}", $attribute_name ) ); @@ -2960,7 +2960,7 @@ private function get_decoded_attribute_value( WP_HTML_Attribute_Token $attribute * * @since 6.2.0 * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive * * @param string $prefix Prefix of requested attribute names. * @return array|null List of attribute names, or `null` when no tag opener is matched. @@ -3515,7 +3515,7 @@ public function is_tag_closer(): bool { * appears then the HTML parser will treat it as an opening tag with no * attributes. The BR tag is unique in this way. * - * @see https://html.spec.whatwg.org/#parsing-main-inbody + * @link https://html.spec.whatwg.org/#parsing-main-inbody */ 'BR' !== $this->get_tag() ); @@ -3833,8 +3833,8 @@ public function get_modifiable_text(): string { * it's important to apply the pre-processing steps, which is * normalizing newlines. * - * @see https://html.spec.whatwg.org/#preprocessing-the-input-stream - * @see https://infra.spec.whatwg.org/#normalize-newlines + * @link https://html.spec.whatwg.org/#preprocessing-the-input-stream + * @link https://infra.spec.whatwg.org/#normalize-newlines */ $text = str_replace( "\r\n", "\n", $text ); $text = str_replace( "\r", "\n", $text ); @@ -4242,7 +4242,7 @@ static function ( $tag_match ) { * * Only 'javascript' and 'json' content types are currently recognized. * - * @see https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element + * @link https://html.spec.whatwg.org/multipage/scripting.html#prepare-the-script-element * * @since 7.0.0 * @ignore @@ -4311,8 +4311,8 @@ private function get_script_content_type(): ?string { * > - text/x-ecmascript * > - text/x-javascript * - * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match - * @see https://mimesniff.spec.whatwg.org/#javascript-mime-type + * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type-essence-match + * @link https://mimesniff.spec.whatwg.org/#javascript-mime-type */ switch ( $type_string ) { case 'application/ecmascript': @@ -4514,9 +4514,9 @@ private function get_script_content_type(): ?string { * as “tag-name-terminating characters.” This sequence forms the start * of what could be a SCRIPT opening or closing tag. * - * @see https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications * @see wp_html_api_script_element_escaping_diagram_source() + * @link https://html.spec.whatwg.org/#restrictions-for-contents-of-script-elements + * @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#specifications * * @since 7.0.0 * @ignore @@ -4624,7 +4624,7 @@ public function set_attribute( $name, $value ): bool { * - greater-than “>” * - ampersand “&” * - * @see https://html.spec.whatwg.org/#attributes-2 + * @link https://html.spec.whatwg.org/#attributes-2 */ if ( 0 === $name_length || @@ -4665,7 +4665,7 @@ public function set_attribute( $name, $value ): bool { /** * Escape attribute values appropriately. * - * @see https://html.spec.whatwg.org/#attributes-3 + * @link https://html.spec.whatwg.org/#attributes-3 */ $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes(), true ) ? esc_url( $value ) @@ -4694,7 +4694,7 @@ public function set_attribute( $name, $value ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $comparable_name = strtolower( $name ); @@ -4770,7 +4770,7 @@ public function remove_attribute( $name ): bool { * > case-insensitive match for each other. * - HTML 5 spec * - * @see https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive + * @link https://html.spec.whatwg.org/multipage/syntax.html#attributes-2:ascii-case-insensitive */ $name = strtolower( $name ); @@ -5340,7 +5340,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > described by the modern HTML and CSS specifications. * * @see self::$compat_mode - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * @@ -5356,7 +5356,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * > built before the widespread adoption of web standards. * * @see self::$compat_mode - * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode + * @link https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode * * @since 6.7.0 * diff --git a/src/wp-includes/html-api/class-wp-html-token.php b/src/wp-includes/html-api/class-wp-html-token.php index de1b843dc33ff..01701d02ec9d1 100644 --- a/src/wp-includes/html-api/class-wp-html-token.php +++ b/src/wp-includes/html-api/class-wp-html-token.php @@ -54,7 +54,7 @@ class WP_HTML_Token { * * @since 6.4.0 * - * @see https://html.spec.whatwg.org/#self-closing-flag + * @link https://html.spec.whatwg.org/#self-closing-flag * * @var bool */ diff --git a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php index 609d521dec440..fa483d83e5671 100644 --- a/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php +++ b/tests/phpunit/data/html5-entities/generate-html5-named-character-references.php @@ -12,7 +12,7 @@ * 'characters' => '©', * ); * - * @see https://html.spec.whatwg.org/entities.json + * @link https://html.spec.whatwg.org/entities.json * * @var array. */ diff --git a/tests/phpunit/includes/build-visual-html-tree.php b/tests/phpunit/includes/build-visual-html-tree.php index d874e944ead0c..b4592df6ef89a 100644 --- a/tests/phpunit/includes/build-visual-html-tree.php +++ b/tests/phpunit/includes/build-visual-html-tree.php @@ -34,7 +34,7 @@ * style="margin-top:50px;margin-bottom:50px;" * * - * @see https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md + * @link https://github.com/web-platform-tests/wpt/blob/master/html/syntax/parsing/resources/README.md * * @since 6.9.0 * diff --git a/tests/phpunit/tests/html-api/wpHtmlDecoder.php b/tests/phpunit/tests/html-api/wpHtmlDecoder.php index a8e1fa65c681a..894cfee43f9f5 100644 --- a/tests/phpunit/tests/html-api/wpHtmlDecoder.php +++ b/tests/phpunit/tests/html-api/wpHtmlDecoder.php @@ -227,7 +227,7 @@ public function test_semicolonless_legacy_reference_before_multibyte_attribute_f * treated as alphanumerics by `ctype_alnum()` on some systems, but should never * be recognized as ASCII Alphanumerics according to the HTML standards. * - * @see https://html.spec.whatwg.org/#named-character-reference-state + * @link https://html.spec.whatwg.org/#named-character-reference-state * * @return array An ASCII alphanumeric is an ASCII digit or ASCII alpha. * > An ASCII alpha is an ASCII upper alpha or ASCII lower alpha. * - * @see https://html.spec.whatwg.org/#named-character-reference-state + * @link https://html.spec.whatwg.org/#named-character-reference-state * * @return Generator Test cases. */