Ignore:
Timestamp:
Jan 16, 2009, 1:51:38 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-01-16 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.


Fixed <rdar://problem/6452301> REGRESSION: Latest WebKit nightlies
turn "c" into "" when stripping
c_ character

  • wrec/WRECParser.cpp: (JSC::WREC::Parser::consumeEscape): Mimic a Firefox quirk when parsing control escapes inside character classes.

LayoutTests:

2009-01-16 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.


Added tests for <rdar://problem/6452301> REGRESSION: Latest WebKit
nightlies turn "c" into "" when stripping
c_ character

  • fast/regex/malformed-escapes-expected.txt:
  • fast/regex/resources/malformed-escapes.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_compile.cpp

    r39963 r39984  
    304304               
    305305                c = *ptr;
    306                 if (!isASCIIAlpha(c)) {
     306
     307                /* To match Firefox, inside a character class, we also accept
     308                   numbers and '_' as control characters */
     309                if ((!isClass && !isASCIIAlpha(c)) || (!isASCIIAlphanumeric(c) && c != '_')) {
    307310                    c = '\\';
    308311                    ptr -= 2;
Note: See TracChangeset for help on using the changeset viewer.