Ticket #4202: 4202.patch

File 4202.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';" ],
     222                [       "'\\ufeff\\xa0\\x1b';" ],
    223223
    224224                [       "function(){this.a();this.b();this.c();}" ],
    225225
  • 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\uffef\\]/g, function( match )
     143                value = value.replace( /[\b\t\n\v\f\r\x1b\xa0\ufeff\\]/g, function( match )
    144144                        {
    145145                                var chars =
    146146                                {
     
    153153                                        '\\' : '\\\\',
    154154                                        '\x1b' : '\\x1b',
    155155                                        '\xa0' : '\\xa0',
    156                                         '\uffef' : '\\uffef'
     156                                        '\ufeff' : '\\ufeff'
    157157                                };
    158158
    159159                                return chars[ match ];
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy