[wp-trac] [WordPress Trac] #47244: wp_targeted_link_rel filter should not be applied to 'Custom HTML` widget
WordPress Trac
noreply at wordpress.org
Thu May 16 00:27:10 UTC 2019
#47244: wp_targeted_link_rel filter should not be applied to 'Custom HTML` widget
--------------------------------------+-----------------------
Reporter: fierevere | Owner: audrasjb
Type: defect (bug) | Status: assigned
Priority: high | Milestone: 5.2.1
Component: Widgets | Version: 5.2
Severity: major | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Comment (by SergeyBiryukov):
[attachment:"47244.3.diff"] builds on @birgire's patch from #46316 and
fixes both tickets. Might need a refresh if #46316 is committed first.
The patch ensures that `rel` attribute is added with the correct quotes:
* if `target='_blank'` has single quotes, then `rel='noopener noreferrer'`
has single quotes too.
* If `target=_blank` does not have quotes (as in the example above),
quotes of the `rel` attribute are checked as a fallback.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47244#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list