[wp-trac] [WordPress Trac] #46402: wp_targeted_link_rel() corrupts serialized array data including ACF field settings.

WordPress Trac noreply at wordpress.org
Sat Mar 2 23:51:33 UTC 2019


#46402: wp_targeted_link_rel() corrupts serialized array data including ACF field
settings.
--------------------------+-----------------------------
 Reporter:  elliotcondon  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi all,

 In [changeset:43732], the `wp_targeted_link_rel()` callback was added to
 filter content before it's saved to the database.

 This addition is corrupting all serialized array data saved in
 post_content containing an `<a>` element, and is breaking the Advanced
 Custom Fields plugin.

 The Advanced Custom Fields uses the post_content value to save serialized
 array data for both its field and field group settings.

 Users who include an `<a>` element within the field "instructions" (or
 other field settings) are experiencing this issue first hand when their
 field no longer loads.

 Serialized data is very useful, but is open to "corruption" by any change
 in character length.

 Is it possible to improve the `wp_targeted_link_rel()` function by
 avoiding serialized / JSON data?

 I believe there is a related issue affecting JSON data [ticket:46316]
 which may also be solved by this improvement.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46402>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list