Merged
Conversation
zaerl
approved these changes
Nov 4, 2025
src/php-toolkit/DataLiberation/BlockMarkup/class-blockmarkupurlprocessor.php
Show resolved
Hide resolved
Merged
adamziel
added a commit
that referenced
this pull request
Nov 5, 2025
|
Sorry @adamziel I don't know how to test a Playground PR before the merge. It seems to be merged now, but I don't know if it's already deployed to the website.... So I tried it again with my theme demo blueprint and content and it still doesn't seem to replace the background image reference When I click on Inspect it still shows me the localhost address.
If you want to test it:
Please notify me, if I am just too early to check on your fix, or how I can help to debug this. |
Contributor
Author
|
It was only released today and seems to work as expected now :) |
|
Yes it does! Sorry, jumped the gun... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds support for rewriting URLs inside CSS syntax, e.g. here:
Before this PR, the
styleattributes in, e.g., the cover block were skipped by the URL rewriter and continued pointing to the old site.Fixes #223
Implementation details
This PR backports
CSSProcessor,CSSURLProcessor, and a few related PRs around Unicode handling from the WordPress/php-toolkit repo:Note the CSSProcessor and CSSURLProcessor are tested against 300 test cases containing various tricky inputs, quoted and unquoted URLs, strings, comments, unicode escape sequences, and more.
Testing instructions
This PR comes with a new test case specifically for various tricky CSS inputs. You're also welcome to try and import a WXR file that contains an inline background-image reference and confirm the URL is correctly rewritten.
cc @zaerl @bph