[wp-trac] [WordPress Trac] #56969: decoding="async" breaks my site
WordPress Trac
noreply at wordpress.org
Tue Nov 8 10:16:41 UTC 2022
#56969: decoding="async" breaks my site
-------------------------------+------------------------------
Reporter: rodricus | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 6.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: performance
-------------------------------+------------------------------
Comment (by mw108):
Same issue here as @joelmadigan - This new feature breaks NinjaForms when
you have {{{img}}} tags in your fields.
The "magic" happens in {{{wp-includes/media.php}}} in {{{function
wp_filter_content_tags( ... )}}}:
Forcing the {{{decoding="async"}}} attribute by using {{{preg_match_all}}}
into all {{{img}}} tags is a bad solution. This has been discussed many
times on StackOverflow: You should not parse HTML using regular
expressions. Parse the DOM properly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56969#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list