summaryrefslogtreecommitdiffstats
path: root/khtml/css/cssparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/css/cssparser.cpp')
-rw-r--r--khtml/css/cssparser.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp
index 23eeb69a9..d167af025 100644
--- a/khtml/css/cssparser.cpp
+++ b/khtml/css/cssparser.cpp
@@ -1351,6 +1351,14 @@ bool CSSParser::parseContent( int propId, bool important )
if ( args->size() != 1)
return false;
Value *a = args->current();
+ if (a->unit != CSSPrimitiveValue::CSS_IDENT) {
+ isValid=false;
+ break;
+ }
+ if (qString(a->string)[0] == '-') {
+ isValid=false;
+ break;
+ }
parsedValue = new CSSPrimitiveValueImpl(domString(a->string), CSSPrimitiveValue::CSS_ATTR);
}
else
@@ -1403,7 +1411,8 @@ CSSValueImpl* CSSParser::parseCounterContent(ValueList *args, bool counters)
CounterImpl *counter = new CounterImpl;
Value *i = args->current();
-// if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
+ if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
+ if (qString(i->string)[0] == '-') goto invalid;
counter->m_identifier = domString(i->string);
if (counters) {
i = args->next();