Ticket #5212: 5212.patch

File 5212.patch, 1.1 KB (added by Garry Yao, 14 years ago)
  • trunk/test/test.js

     
    219219
    220220                [       "x=\"\\nFred\\t\\tKami's \\\\Edu \\r\\n\";" ],
    221221
     222                [       "'\\uffef\\xa0\\x1b';" ],
     223
    222224                [       "function(){this.a();this.b();this.c();}" ],
    223225
    224226                [       "function(){this.a();this.b();this.c();this.d();}",
  • trunk/_source/includes/scriptcompressor.js

     
    140140                        singleParts = value.split( "'" ),
    141141                        doubleParts = value.split( '"' );
    142142
    143                 value = value.replace( /[\b\t\n\v\f\r\x1b\xa0\\]/g, function( match )
     143                value = value.replace( /[\b\t\n\v\f\r\x1b\xa0\uffef\\]/g, function( match )
    144144                        {
    145145                                var chars =
    146146                                {
     
    152152                                        '\r' : '\\r',
    153153                                        '\\' : '\\\\',
    154154                                        '\x1b' : '\\x1b',
    155                                         '\xa0' : '\\xa0'
     155                                        '\xa0' : '\\xa0',
     156                                        '\uffef' : '\\uffef'
    156157                                };
    157158
    158159                                return chars[ match ];
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy