[wp-trac] [WordPress Trac] #37482: Copy/paste shortcode view containing HTML tags is broken
WordPress Trac
noreply at wordpress.org
Wed Jul 27 08:39:05 UTC 2016
#37482: Copy/paste shortcode view containing HTML tags is broken
--------------------------+-----------------------------
Reporter: bduclos | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: trunk
Severity: normal | Keywords:
Focuses: javascript |
--------------------------+-----------------------------
There is an issue when we copy/paste a shortcode view containing HTML
tags. It was working in WP 4.5.3
The issue is line 120 of wp-includes/js/tinymce/plugins/wpview/plugin.js
which creates a text node instead of an html node.
{{{
event.targetClone = editor.getDoc().createTextNode(
window.decodeURIComponent( editor.dom.getAttrib( event.targetClone,
'data-wpview-text' ) )
);
}}}
For example: I have the following shortcode:
{{{
[toggle title="Toggle Title"]<h1>Lorem ipsum</h1>[/toggle]
}}}
In Visual Mode, copy/paste the view generates the following broken view:
[[Image(http://i.imgur.com/dYqUr8P.gif)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37482>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list