Improve CSS server-side cleaner

Fixes #3040
This commit is contained in:
Francis Lachapelle 2015-01-28 16:38:27 -05:00
parent 7fd1564a86
commit 4cc158043e

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)