fixed filtering of valid ID selectors

git-svn-id: svn://10.0.0.236/trunk@9702 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1998-09-10 01:18:06 +00:00
parent b2413c6722
commit 0ef705b4ba
3 changed files with 3 additions and 3 deletions

View File

@@ -874,7 +874,7 @@ PRBool CSSParserImpl::ParseSelector(PRInt32* aErrorCode,
}
if (eCSSToken_ID == tk->mType) {
// #id
if ((1 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(1)))) { // verify is legal ID
if ((0 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(0)))) { // verify is legal ID
mask |= SELECTOR_ID;
aSelectorResult->mID.Append(tk->mIdent);
if (!GetToken(aErrorCode, PR_FALSE)) {

View File

@@ -874,7 +874,7 @@ PRBool CSSParserImpl::ParseSelector(PRInt32* aErrorCode,
}
if (eCSSToken_ID == tk->mType) {
// #id
if ((1 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(1)))) { // verify is legal ID
if ((0 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(0)))) { // verify is legal ID
mask |= SELECTOR_ID;
aSelectorResult->mID.Append(tk->mIdent);
if (!GetToken(aErrorCode, PR_FALSE)) {

View File

@@ -874,7 +874,7 @@ PRBool CSSParserImpl::ParseSelector(PRInt32* aErrorCode,
}
if (eCSSToken_ID == tk->mType) {
// #id
if ((1 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(1)))) { // verify is legal ID
if ((0 < tk->mIdent.Length()) && (nsString::IsAlpha(tk->mIdent.CharAt(0)))) { // verify is legal ID
mask |= SELECTOR_ID;
aSelectorResult->mID.Append(tk->mIdent);
if (!GetToken(aErrorCode, PR_FALSE)) {