[wp-trac] [WordPress Trac] #13327: Post editor puts content through wpautop() before displaying it to users without JS enabled

WordPress Trac noreply at wordpress.org
Sun Oct 12 15:55:48 UTC 2014


#13327: Post editor puts content through wpautop() before displaying it to users
without JS enabled
--------------------------+-----------------------------
 Reporter:  markjaquith   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  Future Release
Component:  Editor        |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+-----------------------------

Comment (by azaozz):

 Looking at this again: the best way to fix it would be to scrap
 `wp_richedit_pre()` and use only `wp_htmledit_pre()`, then run the
 textarea content through the JS wpautop before initializing TinyMCE (same
 as switching from Text to Visual).

 That would make the textarea content consistent and would fix other bugs.
 For example the browser restores the "last seen" textarea content on using
 the Back or Forward buttons. Currently on the Edit Post screen we have to
 set `autocomplete="off"` on the whole form in Chrome, as it doesn't
 respect it on the textarea.

 However this could potentially introduce bugs in plugins that use TinyMCE
 and don't use wp_richedit_pre/wp_htmledit_pre to prepare the textarea
 content. We would need to ensure that arbitrary HTML that has <p> tags can
 pass through the JS wpautop() safely.

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


More information about the wp-trac mailing list