Fixes a regression in 1.3.0 — upgrade if you installed it
1.3.0 could render a blank page. The attribute pattern it added used a lazy
.*? together with the s flag, so a stretch of markup without a closing quote
could scan the entire document. On larger pages that exceeds PCRE's
pcre.backtrack_limit; preg_replace_callback() returns null on that failure,
and because the rewrite runs inside an output buffer, the null was emitted as
an empty page.
Two changes:
- The pattern now uses a negated character class and drops the
sflag, so a
match is bounded to a single attribute value and can't run away. - Both rewrite passes now fall back to the untouched markup when
preg_*
returnsnull, so no future regex failure can discard page output.
Everything from 1.3.0 is intact — plugins_loaded bootstrap, src/srcset
rewriting, and the is_local_media_url() guard.
Full Changelog: v1.3.0...v1.3.1