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:
parent
b513ea197b
commit
fdde197d93
@ -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>' );
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user