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

Refactor ImageCDN parsing to rely on HTML API instead of RegExps #32700

Merged
merged 10 commits into from
Aug 28, 2024

Commits on Aug 24, 2024

  1. Refactor ImageCDN parsing to rely on HTML API instead of RegExps (#32700

    )
    
    The introduction of the HTML API into WordPress 6.2 offers a new method of
    matching and modifying HTML. In this patch we're replacing code that attempts
    to parse the input HTML and visit all images, then read and modify them based
    on the values of their attributes and computed Photon properties.
    
    In the previous code the `Image_CDN` class scanned the entire HTML document to
    generate a list of PREG image match objects, then iterated over those matches
    and performed string-replace operations on them.
    
    Now the class does a pass from start to finish, visting each image tag along
    the way, and making the appropriate modifications.
    
    Co-authored-by: Adnan Haque <3737780+haqadn@users.noreply.github.com>
    Co-authored-by: Brandon Kraft <public@brandonkraft.com>
    Co-authored-by: Jeremy Herve <jeremy@jeremy.hu>
    Co-authored-by: Mark George <thingalon@gmail.com>
    Co-authored-by: Osk <oskosk@users.noreply.github.com>
    6 people committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    227be97 View commit details
    Browse the repository at this point in the history
  2. Rearrange semantically equivalent test output to avoid false negatives.

    No `assertEquivalentMarkup` exists yet, so this gets around that without
    creating one.
    dmsnell committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    c07bf51 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Fix broken test

    dilirity committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    12c5dc7 View commit details
    Browse the repository at this point in the history
  2. Remove unnecessary comment

    dilirity committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    9a26095 View commit details
    Browse the repository at this point in the history
  3. Fix static analysis issues

    dilirity committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    bd5d285 View commit details
    Browse the repository at this point in the history
  4. Fix static analysis issue

    dilirity committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    bc0db1e View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    0603fc9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3517e03 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Configuration menu
    Copy the full SHA
    cbd3417 View commit details
    Browse the repository at this point in the history
  2. Fix project version

    dilirity committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    8986690 View commit details
    Browse the repository at this point in the history