[wp-trac] [WordPress Trac] #52250: Standardize sanitization of post title during export

WordPress Trac noreply at wordpress.org
Mon Jan 25 00:08:24 UTC 2021


#52250: Standardize sanitization of post title during export
---------------------------------------------+---------------------
 Reporter:  jmdodd                           |       Owner:  pento
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  5.7
Component:  Export                           |     Version:  trunk
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch commit needs-dev-note  |     Focuses:
---------------------------------------------+---------------------
Changes (by pento):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50011" 50011]:
 {{{
 #!CommitTicketReference repository="" revision="50011"
 Export: Create an export-specific filter for post titles.

 Since WordPress 2.5 and 2.6, `post_content` and `post_excerpt` have both
 had export-specific filters: `the_content_export`, and
 `the_excerpt_export`, respectively. `post_title`, however, has used
 `the_title_rss`, which behaves differently in two important ways:

 - It strips HTML tags from the string.
 - It HTML-encodes the title string.

 These behaviours are not ideal for exports, since it changes the post
 title, resulting in data loss in export files, and incorrect post
 duplicate matching on import. This changes replaces the usage of
 `the_title_rss` with a new filter, `the_title_export`. The new filter is
 intended to be used in the same as `the_content_export` and
 `the_excerpt_export`.

 Props jmdodd, audrasjb.
 Fixes #52250.
 }}}

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


More information about the wp-trac mailing list