Make WordPress Core

Changeset 55723


Ignore:
Timestamp:
05/05/2023 10:56:24 AM (23 months ago)
Author:
audrasjb
Message:

HTML API: Restore mistakenly-removed content in documentation.

In [55718] the Unicode replacement character was mistakenly removed. The purpose of including the character was to communicate what it looks like and why the Tag Processor won't insert it into the document.

This changeset brings the character back and adds a small clue to fix the confusion that may lead to its removal.

Follow-up to [55718].

Props dmsnell.
Fixes #58256
See #57840.

File:
1 edited

Legend:

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

    r55721 r55723  
    230230 * HTML5 specifies that certain invalid content be transformed into different forms
    231231 * for display, such as removing null bytes from an input document and replacing
    232  * invalid characters with the Unicode replacement character `U+FFFD`. Where errors
    233  * or transformations exist within the HTML5 specification, the Tag Processor leaves
    234  * those invalid inputs untouched, passing them through to the final browser to handle.
    235  * While this implies that certain operations will be non-spec-compliant, such as
    236  * reading the value of an attribute with invalid content, it also preserves a
     232 * invalid characters with the Unicode replacement character `U+FFFD` (visually "�").
     233 * Where errors or transformations exist within the HTML5 specification, the Tag Processor
     234 * leaves those invalid inputs untouched, passing them through to the final browser
     235 * to handle. While this implies that certain operations will be non-spec-compliant,
     236 * such as reading the value of an attribute with invalid content, it also preserves a
    237237 * simplicity and efficiency for handling those error cases.
    238238 *
Note: See TracChangeset for help on using the changeset viewer.