Changeset 12652 in webkit
- Timestamp:
- Feb 7, 2006 6:39:22 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r12644 r12652 1 2006-02-07 Adele Peterson <adele@apple.com> 2 3 - test for 4 <rdar://problem/3727939> Safari strips \0 characters from HTML tags making them valid 5 6 * fast/encoding/decoder-allow-null-chars.html 7 * fast/encoding/decoder-allow-null-chars-expected.txt 8 1 9 2006-02-07 Alexey Proskuryakov <ap@nypop.com> 2 10 -
trunk/WebCore/ChangeLog
r12651 r12652 1 2006-02-07 Adele Peterson <adele@apple.com> 2 3 Reviewed by Maciej. 4 5 - Fixed <rdar://problem/3727939> Safari strips \0 characters from HTML tags making them valid 6 7 Test: fast/encoding/decoder-allow-null-chars.html 8 9 * kwq/KWQTextCodec.cpp: 10 (KWQTextDecoder::convertLatin1): Removed stripping of null characters 11 (unwanted): ditto. 12 1 13 2006-02-07 David Hyatt <hyatt@apple.com> 2 14 -
trunk/WebCore/kwq/KWQTextCodec.cpp
r12471 r12652 285 285 ASSERT(_numBufferedBytes == 0); 286 286 287 int i; 288 for (i = 0; i != length; ++i) { 289 if (s[i] == 0) { 290 break; 291 } 292 } 293 if (i == length) { 294 return QString(reinterpret_cast<const char *>(s), length); 295 } 296 297 QString result(""); 298 299 result.reserve(length); 300 301 result.append(reinterpret_cast<const char *>(s), i); 302 int start = ++i; 303 for (; i != length; ++i) { 304 if (s[i] == 0) { 305 if (start != i) { 306 result.append(reinterpret_cast<const char *>(&s[start]), i - start); 307 } 308 start = i + 1; 309 } 310 } 311 if (start != length) { 312 result.append(reinterpret_cast<const char *>(&s[start]), length - start); 313 } 314 315 return result; 287 return QString(reinterpret_cast<const char *>(s), length); 316 288 } 317 289 … … 406 378 } 407 379 408 // We strip NUL characters because other browsers (at least WinIE) do.409 380 // We strip replacement characters because the ICU converter for UTF-8 converts 410 381 // invalid sequences into replacement characters, but other browsers discard them. … … 414 385 { 415 386 switch (c) { 416 case 0:417 387 case replacementCharacter: 418 388 case BOM:
Note: See TracChangeset
for help on using the changeset viewer.