Changeset 26676 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Oct 16, 2007, 1:13:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r26619 r26676 1 1 // -*- c-basic-offset: 2 -*- 2 2 /* 3 * This file is part of the KDE libraries4 3 * Copyright (C) 1999-2002 Harri Porten ([email protected]) 5 4 * Copyright (C) 2001 Peter Kelly ([email protected]) 6 * Copyright (C) 2003 Apple Computer, Inc.5 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 7 6 * Copyright (C) 2007 Cameron Zwarich ([email protected]) 8 7 * … … 41 40 #include <assert.h> 42 41 #include <string.h> 43 #include <ctype.h> 44 42 43 #include <wtf/ASCIICType.h> 45 44 #include <wtf/unicode/Unicode.h> 46 45 … … 583 582 if (c == '%') { 584 583 int charLen = 0; 585 if (k <= len - 3 && is xdigit(p[1].uc) && isxdigit(p[2].uc)) {584 if (k <= len - 3 && isASCIIHexDigit(p[1].uc) && isASCIIHexDigit(p[2].uc)) { 586 585 const char b0 = Lexer::convertHex(p[1].uc, p[2].uc); 587 586 const int sequenceLen = UTF8SequenceLength(b0); … … 592 591 for (int i = 1; i < sequenceLen; ++i) { 593 592 const UChar* q = p + i * 3; 594 if (q[0] == '%' && is xdigit(q[1].uc) && isxdigit(q[2].uc))593 if (q[0] == '%' && isASCIIHexDigit(q[1].uc) && isASCIIHexDigit(q[2].uc)) 595 594 sequence[i] = Lexer::convertHex(q[1].uc, q[2].uc); 596 595 else { … … 620 619 // For that, it's good to support the wonky "%u" syntax for compatibility with WinIE. 621 620 if (k <= len - 6 && p[1] == 'u' 622 && is xdigit(p[2].uc) && isxdigit(p[3].uc)623 && is xdigit(p[4].uc) && isxdigit(p[5].uc)) {621 && isASCIIHexDigit(p[2].uc) && isASCIIHexDigit(p[3].uc) 622 && isASCIIHexDigit(p[4].uc) && isASCIIHexDigit(p[5].uc)) { 624 623 charLen = 6; 625 624 u = Lexer::convertUnicode(p[2].uc, p[3].uc, p[4].uc, p[5].uc);
Note:
See TracChangeset
for help on using the changeset viewer.