replace ' with apostrophe (bug 308998)

This commit is contained in:
pinkerton%aol.net 2005-11-02 15:54:29 +00:00
Родитель f999e59537
Коммит 6e1d572d67
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -138,7 +138,7 @@
return; return;
} }
[self getCharacters: buffer]; // does not null terminate [self getCharacters:buffer]; // does not null terminate
ioString.Assign(buffer, len); ioString.Assign(buffer, len);
if (buffer != stackBuffer) if (buffer != stackBuffer)
@ -232,6 +232,7 @@
[dirtyStringMutant replaceOccurrencesOfString:@"&lt;"withString:@"<" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])]; [dirtyStringMutant replaceOccurrencesOfString:@"&lt;"withString:@"<" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])];
[dirtyStringMutant replaceOccurrencesOfString:@"&gt;"withString:@">" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])]; [dirtyStringMutant replaceOccurrencesOfString:@"&gt;"withString:@">" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])];
[dirtyStringMutant replaceOccurrencesOfString:@"&mdash;"withString:@"-" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])]; [dirtyStringMutant replaceOccurrencesOfString:@"&mdash;"withString:@"-" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])];
[dirtyStringMutant replaceOccurrencesOfString:@"&apos;"withString:@"'" options:NSLiteralSearch range:NSMakeRange(0,[dirtyStringMutant length])];
return [dirtyStringMutant stringByRemovingCharactersInSet:[NSCharacterSet controlCharacterSet]]; return [dirtyStringMutant stringByRemovingCharactersInSet:[NSCharacterSet controlCharacterSet]];
} }