[wp-trac] [WordPress Trac] #37814: wpautop losing closing </pre> tags if doubled

WordPress Trac noreply at wordpress.org
Mon Apr 22 21:04:29 UTC 2019


#37814: wpautop losing closing </pre> tags if doubled
-------------------------------------+------------------------------
 Reporter:  andyimatest              |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Formatting               |     Version:  4.6
 Severity:  normal                   |  Resolution:
 Keywords:  close reporter-feedback  |     Focuses:
-------------------------------------+------------------------------
Changes (by desrosj):

 * keywords:   => close reporter-feedback


Comment:

 Hi @andyimatest,

 Welcome to Trac! First, my apologies that it took so long to receive a
 response.

 The first thing that sticks out to me in your example is that the HTML
 class names are invalid. The `;` and `:` characters cannot be used in the
 class attribute.

 I have tried to reproduce the issue you are describing, but I am not
 having any success. Using the Classic Editor, When I paste your example
 text in to the Text editor, switch to the Visual editor, and then switch
 back to Text, I see the following:

 {{{
 <pre class="brush: csharp; title: ; notranslate" title="">test test test
 </pre>
 }}}

 The outer `<pre>` tag us eliminated.

 When using the block editor, if I switch to Edit as HTML, paste the
 example, and switch back to Edit Visually, the result is the following:

 {{{
 <pre class="wp-block-preformatted"><pre class="brush: csharp; title: ;
 notranslate" title="">test test test
 </pre></pre>
 }}}

 The outer `<pre>` tag is preserved with the matching closing tag, but a
 class is added.

 Are you still able to reproduce the issue you described originally? I am
 going to mark this as a close candidate, but please do provide more
 details if you can.

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


More information about the wp-trac mailing list