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

HTML API: Add custom text decoder #6387

Closed
wants to merge 23 commits into from

Commits on May 15, 2024

  1. HTML API: Add custom text decoder.

    Provide a custom decoder for strings coming from HTML attributes and
    markup. This custom decoder is necessary because of deficiencies in
    PHP's `html_entity_decode()` function:
    
     - It isn't aware of 720 of the possible named character references in
       HTML, leaving many out that should be translated.
    
     - It isn't able to decode character references in data segments where
       the final semicolon is missing, or when there are ambiguous
       characters after the reference name but before the semicolon.
       This one is complicated: refer to the HTML5 specification to clarify.
    
    This decoder will also provide some conveniences, such as making a
    single-pass and interruptable decode operation possible. This will
    provide a number of opportunities to optimize detection and decoding
    of things like value prefixes, and whether a value contains a given
    substring.
    dmsnell committed May 15, 2024
    Configuration menu
    Copy the full SHA
    3ff78cc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    401d30f View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Adjust docs, names.

    dmsnell committed May 24, 2024
    Configuration menu
    Copy the full SHA
    4f5f21e View commit details
    Browse the repository at this point in the history

Commits on May 25, 2024

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

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    d60e320 View commit details
    Browse the repository at this point in the history
  2. Fix alignment lint

    sirreal committed May 28, 2024
    Configuration menu
    Copy the full SHA
    db384b9 View commit details
    Browse the repository at this point in the history
  3. Annotate global variable type

    sirreal committed May 28, 2024
    Configuration menu
    Copy the full SHA
    be8b2a5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8f9b076 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d3dee1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b559320 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    53dafce View commit details
    Browse the repository at this point in the history
  8. Add WIP test for edge cases.

    dmsnell committed May 28, 2024
    Configuration menu
    Copy the full SHA
    3bf0434 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    edbc0b0 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Configuration menu
    Copy the full SHA
    fd83c46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59671d6 View commit details
    Browse the repository at this point in the history
  3. Fill in test phpdoc details

    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    ab672e7 View commit details
    Browse the repository at this point in the history
  4. Update optional $case_sensitivity param types

    ?string (nullable string) was used for these types.
    The type should be string, optionality can appear in the param description
    but is derived from a default argument.
    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    2e2fb8b View commit details
    Browse the repository at this point in the history
  5. Fix optional @param types

    ?Type is a nullable Type, not an optional parameter. Identify optional
    parameters in the @param description.
    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    d38df36 View commit details
    Browse the repository at this point in the history
  6. Use default argument for read_character_reference at

    Instead of a nullable parameter that updates to `0` in the body of the
    function when null, use a default argument `0`, update the @param type
    and remove the null check and set from the function body.
    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    9931e09 View commit details
    Browse the repository at this point in the history
  7. Add additional attribute prefix tests

    Add mixed case and non-matching test cases
    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    95820aa View commit details
    Browse the repository at this point in the history
  8. Change byte_length_of_matched_token to matched_token_byte_length

    Update the parameter name and description to align with the descriptions
    of analogous parameters used in WP_Token_Map methods.
    sirreal committed May 29, 2024
    Configuration menu
    Copy the full SHA
    47dcdc1 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2024

  1. Docblock cleanup

    dmsnell committed May 31, 2024
    Configuration menu
    Copy the full SHA
    0c0b36c View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2024

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