closingCommentPos = content.find("*/", equalSignPos + 1);
if (closingCommentPos == kNotFound)
return String();
- if (!content.substring(closingCommentPos + 2).containsOnlyWhitespace())
- return String();
}
break;
String match = commentType == CSSMagicComment
? content.substring(urlPos, closingCommentPos - urlPos)
: content.substring(urlPos);
+
+ size_t newLine = match.find("\n");
+ if (newLine != kNotFound)
+ match = match.substring(0, newLine);
match = match.stripWhiteSpace();
- String disallowedChars("\"' \t\n\r");
+ String disallowedChars("\"' \t");
for (unsigned i = 0; i < match.length(); ++i) {
if (disallowedChars.find(match[i]) != kNotFound)
- return String();
+ return "";
}
return match;