[wp-trac] [WordPress Trac] #27856: gallery shortcode adding empty parapraphs when switching between text and visual editor

WordPress Trac noreply at wordpress.org
Sun Aug 10 04:43:14 UTC 2014


#27856: gallery shortcode adding empty parapraphs when switching between text and
visual editor
----------------------------+-----------------------
 Reporter:  robinroelofsen  |       Owner:
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:
Component:  Gallery         |     Version:  3.9
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------
Changes (by yammy):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Hi!
 I'm trying to preserve the html editor with no paragraphs and brs stripped
 or added by editor.

 Using plugins: Preserved Html editor / PS Disable Auto Formatting
 together, because each alone doesn't remove the <p>s completely, and
 neither does wpautop.

 It's almost working, except for [gallery] that still keeps beeing wrapped
 in <p><p></p> thing.

 <h1>foo</h1>[gallery][gallery] becomes
 <h1>foo</h1><p>[gallery]</p><p></p><p>[gallery]</p><p>


 Testing with default theme or another doesn't matter. Testing in Firefox
 last version.


 The issue happens only when switching from text tab to visual tab, them
 back to text tab (some javascript replacer?)


 Tried enabling wpautop, tried filtering content replacing <p> with regex,
 but nothing worked.


 I can show you my screen with teamviewer if wanted. Just ask.

 Thank you!

 []s

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


More information about the wp-trac mailing list