Improve CSS server-side cleaner

Fixes #3040
pull/69/merge
Francis Lachapelle 2015-01-28 16:38:27 -05:00
parent 7fd1564a86
commit 4cc158043e
1 changed files with 4 additions and 0 deletions

View File

@ -455,6 +455,10 @@ static NSData* _sanitizeContent(NSData *theData)
{
if (*currentChar == '{')
inCSSDeclaration = YES;
if (*currentChar == '}')
// CSS syntax error: ending declaration character while not in a CSS declaration.
// Ignore eveything from last CSS declaration.
start = currentChar + 1;
else if (*currentChar == ',')
hasEmbeddedCSS = NO;
else if (!hasEmbeddedCSS)