mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
TinyMCE wpView: don't insert nested paragraphs when inserting embeddable URLs. Props iseulde, fixes #29526.
Built from https://develop.svn.wordpress.org/trunk@31485 git-svn-id: http://core.svn.wordpress.org/trunk@31466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3c64d94ba9
commit
0fa4845eec
@ -877,7 +877,7 @@ window.wp = window.wp || {};
|
||||
|
||||
wp.mce.views.register( 'embedURL', _.extend( {}, wp.mce.embedMixin, {
|
||||
toView: function( content ) {
|
||||
var re = /(?:^|<p>)(https?:\/\/[^\s"]+?)(?:<\/p>\s*|$)/gi,
|
||||
var re = /(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,
|
||||
match = re.exec( tinymce.trim( content ) );
|
||||
|
||||
if ( ! match ) {
|
||||
@ -885,10 +885,10 @@ window.wp = window.wp || {};
|
||||
}
|
||||
|
||||
return {
|
||||
index: match.index,
|
||||
content: match[0],
|
||||
index: match.index + match[1].length,
|
||||
content: match[2],
|
||||
options: {
|
||||
url: match[1]
|
||||
url: match[2]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
2
wp-includes/js/mce-view.min.js
vendored
2
wp-includes/js/mce-view.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31484';
|
||||
$wp_version = '4.2-alpha-31485';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user