[wp-trac] [WordPress Trac] #38511: Copy paste a long shortcode wpview (video, gallery... ) is broken in Firefox

WordPress Trac noreply at wordpress.org
Wed Nov 16 18:07:23 UTC 2016


#38511: Copy paste a long shortcode wpview (video, gallery... ) is broken in
Firefox
--------------------------+-----------------------------
 Reporter:  bduclos       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  TinyMCE       |     Version:  4.6.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------------

Comment (by gitlost):

 > This is a really strange issue... Scripts are run at first (so the
 contents set), but then shortly afterwards the whole iframe unloads.

 This is caused by the quirks routine `refreshContentEditable()` which
 (Firefox-only) reloads the body if there's no selection. Calling this
 early (so that later calls are a noop) is one way to workaround this
 issue.

 The OP is caused by Firefox prettyprinting text/html into the clipboard,
 wrapping long lines by inserting newlines. Shortcodes with attributes then
 get wpautoped causing them not to parse. The following patch uses the
 existing `pastepreprocess` action in "wpviews/plugin.js" to remove them.

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


More information about the wp-trac mailing list