[wp-trac] [WordPress Trac] #45829: New editor replaces > with &gt; within <pre> tag

WordPress Trac noreply at wordpress.org
Fri Jan 4 14:18:23 UTC 2019


#45829: New editor replaces > with > within <pre> tag
--------------------------------------+------------------------------
 Reporter:  yannsalmon                |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Editor                    |     Version:  5.0.2
 Severity:  major                     |  Resolution:
 Keywords:  dev-feedback needs-patch  |     Focuses:  javascript
--------------------------------------+------------------------------
Changes (by subrataemfluence):

 * keywords:   => dev-feedback needs-patch
 * focuses:   => javascript


Comment:

 You are right!

 Actually the behavior is quite strange. I have the following code:
 <pre><div></div></pre>.

 When I look into HTML it turns to
 <p><pre><br><div><br></div><br></pre></p>

 Not all `<` are converted to `<` `<br>`, `<p>` and `</p>` all are fine.
 For hand written HTML tags like `pre` and `div`, `>` are not converted to
 `>`.

 It looks like default HTML tags rendered by Gutenberg are fine. The
 strange behavior starts with HTML tags we write by hand!

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


More information about the wp-trac mailing list