WordPress.org

Make WordPress Core

Changeset 35727


Ignore:
Timestamp:
11/22/2015 07:12:21 PM (4 years ago)
Author:
azaozz
Message:

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

Fixes #34760.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/editor.js

    r33624 r35727  
    237237            if ( text.indexOf( '<pre' ) !== -1 || text.indexOf( '<script' ) !== -1 ) {
    238238                preserve_linebreaks = true;
    239                 text = text.replace( /<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function( a ) {
     239                text = text.replace( /<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function( a ) {
    240240                    return a.replace( /\n/g, '<wp-line-break>' );
    241241                });
Note: See TracChangeset for help on using the changeset viewer.