mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-31 03:07:17 +00:00
RTFHandler: protect against CR and bad hexadecimal sequence
In RTF is possible to specify characters with the sequence \'XX being XX an hexadecimal number. With this changeset we guard against incorrect hexadecimal numbers which will be ignored. The other change added is to ignore carriadge returns in plain text.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -306,4 +306,13 @@
|
||||
againstExpectedHTML: expected];
|
||||
}
|
||||
|
||||
- (void) test_bad_hex_and_cr
|
||||
{
|
||||
NSString *file =@"bad_hex_and_cr.rtf";
|
||||
NSString *expected=@"<html><meta charset='utf-8'><body><font face=\"Calibri\"><font face=\"Calibri Cyr\"><font color=\"#000000\">Good hex:H Bad1Hex: Bad2Hex: Ignored Carriadge Return</font></font></font></body></html>";
|
||||
|
||||
[self checkHTMLConversionOfRTFFile: file
|
||||
againstExpectedHTML: expected];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user