[wp-trac] [WordPress Trac] #48366: Export valid paragraphs HTML with wpautop applied

WordPress Trac noreply at wordpress.org
Fri Oct 18 12:26:13 UTC 2019


#48366: Export valid paragraphs HTML with wpautop applied
-------------------------+-----------------------------
 Reporter:  Rarst        |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Export       |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 WordPress exports post content mostly as is from database. It runs through
 `the_content_export` filter, which does not by default have any of the
 typical `the_content` filters added.

 The most visible impact is that `wpautop()` is not applied and paragraphs
 have no `<p>` tags around them.

 Effectively this makes exported content corrupted for systems other than
 WordPress itself.

 In spirit of "own your data" I suggest this is reconsidered, in favor of
 exporting valid platform-agnostic HTML markup.

 From a quick look on implementation levels it seems just adding
 `wpautop()` might not be sufficient due to a special blocks-related logic
 in WP 5+ ? Or can that be ignored for export purposes?

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


More information about the wp-trac mailing list