TinyMCE: fix the regexp used to protect line breaks inside script and pre tags to match <script> that load external scripts.

Fixes #34760.

git-svn-id: https://develop.svn.wordpress.org/trunk@35727 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2015-11-22 19:12:21 +00:00
parent b513ea197b
commit fdde197d93

View File

@ -236,7 +236,7 @@
// Protect pre|script tags
if ( text.indexOf( '<pre' ) !== -1 || text.indexOf( '<script' ) !== -1 ) {
preserve_linebreaks = true;
text = text.replace( /<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function( a ) {
text = text.replace( /<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function( a ) {
return a.replace( /\n/g, '<wp-line-break>' );
});
}