[wp-trac] [WordPress Trac] #45292: wp_targeted_link_rel "corrupts" the customized changeset JSON when inserting the changeset post in database
WordPress Trac
noreply at wordpress.org
Wed Jan 23 00:01:36 UTC 2019
#45292: wp_targeted_link_rel "corrupts" the customized changeset JSON when
inserting the changeset post in database
--------------------------------------+---------------------
Reporter: nikeo | Owner: (none)
Type: defect (bug) | Status: new
Priority: high | Milestone: 5.1
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Changes (by peterwilsoncc):
* keywords: needs-patch needs-unit-tests => has-patch has-unit-tests
Comment:
In [attachment:"45292.diff"]
* Moves adding the default filters to a new function,
`wp_init_targeted_link_rel_filters()`
* Introduces `wp_remove_targeted_link_rel_filters()` for removing filters
* Duplicates the kses approach to remove the filters when saving
customizer change sets in `src/wp-includes/class-wp-customize-
manager.php`.
* Adds a test to ensure the filters are running when saving a post.
@westonruter I haven't included a test to ensure the filters are properly
removed when saving change sets. I couldn't find any prior artwork for
testing kses removal, are you able to point me in the right direction?
Tested manually using @nikeo's POC above, thanks boss.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45292#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list