Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: HTML API: Add an XML serializer. #7408

Draft
wants to merge 15 commits into
base: trunk
Choose a base branch
from
Draft

Commits on Sep 11, 2024

  1. HTML API: Add normalization functions.

    The HTML Processor understands HTML regardless of how it's written, but
    many other functions are unable to do so. There are all sorts of syntax
    peculiarities and semantics that would be helpful to eliminate using the
    knowledge contained in the HTML Processor.
    
    This patch introduces `WP_HTML_Processor::normalize( $html )` as a
    method which takes a fragment of HTML as input and then returns a
    serialized version of the input, "cleaning it up" by balancing all
    tags, providing all missing optional tags, re-encoding all text,
    removing all duplicate attributes, and double-quote-escaping all
    attribute values.
    
    Core-62036
    dmsnell committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    d372c97 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    07e89bb View commit details
    Browse the repository at this point in the history
  3. Adjust some text encoding.

    dmsnell committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    754118e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9c6e34c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7f5783e View commit details
    Browse the repository at this point in the history
  6. Progressive tense for function summaries.

    Co-authored-by: Weston Ruter <westonruter@git.wordpress.org>
    dmsnell and westonruter committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    2aa89fa View commit details
    Browse the repository at this point in the history
  7. Leave space before self-closing flag to avoid later problems.

    If code later in the processing pipeline adds unquoted attributes
    and doesn't add the requisite space following that, then another
    parser might find that the solidus is part of the attribute value
    instead of serving as a self-closing flag.
    
    Co-authored-by: Weston Ruter <westonruter@git.wordpress.org>
    dmsnell and westonruter committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7029b25 View commit details
    Browse the repository at this point in the history
  8. Expand support for bogus comments.

    Co-authored-by: Weston Ruter <westonruter@git.wordpress.org>
    dmsnell and westonruter committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    00a5773 View commit details
    Browse the repository at this point in the history
  9. Whitespace

    dmsnell committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    99799b7 View commit details
    Browse the repository at this point in the history
  10. Update docs examples.

    dmsnell committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    db24c11 View commit details
    Browse the repository at this point in the history
  11. Raise WP error when failing.

    Co-authored-by: Weston Ruter <westonruter@git.wordpress.org>
    dmsnell and westonruter committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    7b8aa53 View commit details
    Browse the repository at this point in the history
  12. Change error level to warning.

    Co-authored-by: Weston Ruter <westonruter@git.wordpress.org>
    dmsnell and westonruter committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    18b5005 View commit details
    Browse the repository at this point in the history
  13. Add an XML serializer.

    dmsnell committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    f914c3f View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Configuration menu
    Copy the full SHA
    4721aa2 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    9bad471 View commit details
    Browse the repository at this point in the history