[wp-trac] [WordPress Trac] #56969: decoding="async" breaks my site
WordPress Trac
noreply at wordpress.org
Tue Nov 8 22:58:17 UTC 2022
#56969: decoding="async" breaks my site
-------------------------------------------------+-------------------------
Reporter: rodricus | Owner:
| adamsilverstein
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.1.1
Component: Media | Version: 6.1
Severity: normal | Resolution:
Keywords: reporter-feedback has-patch has- | Focuses:
unit-tests dev-feedback | performance
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):
* keywords: reporter-feedback has-patch has-unit-tests => reporter-
feedback has-patch has-unit-tests dev-feedback
Comment:
> I'd like to chime in with an instance of the same issue in a slightly
different context.
> This new feature breaks NinjaForms when you have img tags in your
fields.
Thanks @joelmadigan & @mw108 this helped me get to:
### Steps to reproduce ###
1. Install Ninja Forms
2. Create a form with single HTML field, inserting an image in the Default
Value field
3. Insert the form on a page and view
> So the best fix for this bug would probably be to add a similar check
before adding any decoding attribute: If there is no src=" in the img tag,
don't add the attribute. (If there is no src attribute, it's probably some
special case that core shouldn't handle anyway.)
I did just this in https://core.trac.wordpress.org/ticket/56969
Also added some tests to cover the JSON case and the single quote case,
both of which fail before the patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56969#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list