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

WordPress Trac noreply at wordpress.org
Thu May 16 11:07:46 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:  Formatting                           |     Version:  5.1
 Severity:  normal                               |  Resolution:
 Keywords:  dev-feedback has-patch has-unit-     |     Focuses:
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by birgire):

 * keywords:  dev-feedback => dev-feedback has-patch has-unit-tests
 * component:  General => Formatting


Comment:

 [attachment:"46402.diff"] is a suggestion how we could ignore entirely
 serialized content using
 [https://developer.wordpress.org/reference/functions/is_serialized/
 is_serialized()].

 Within {{{is_serialized()}}} there are various checks before the regex
 matches kick in there, like if the trimmed content has {{{:}}} as the
 second character. So in most cases when the content isn't entirely
 serialized, it shouldn't hit these extra regex matches in
 {{{is_serialized()}}}.

 As the content of custom post types can be used for various data formats,
 I also wonder if the {{{wp_targeted_link_rel()}}} filtering should be made
 easier to remove per post type or post ID?

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


More information about the wp-trac mailing list