Fixing bug 122119, cannot use consecutive white space characters in PARAM tags, r=harishd, sr=jst

This commit is contained in:
peterlubczynski@netscape.com
2002-06-12 16:41:25 +00:00
parent c33fa22b6a
commit dd4b312211
2 changed files with 8 additions and 6 deletions

View File

@@ -924,7 +924,7 @@ nsObjectFrame::MakeAbsoluteURL(nsIURI* *aFullURI,
rv = mInstanceOwner->GetDocument(getter_AddRefs(document));
//trim leading and trailing whitespace
aSrc.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE);
aSrc.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE);
// get document charset
nsAutoString originCharset;
@@ -3005,9 +3005,10 @@ nsresult nsPluginInstanceOwner::EnsureCachedAttrParamArrays()
* myval " may be interpreted as "myval"). Authors
* should not declare attribute values with
* leading or trailing white space.''
* However, do not trim consecutive spaces as in bug 122119
*/
name.CompressWhitespace(); // XXX right function?
value.CompressWhitespace();
name.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE);
value.Trim(" \n\r\t\b", PR_TRUE, PR_TRUE, PR_FALSE);
mCachedAttrParamNames [mNumCachedAttrs + 1 + c] = ToNewUTF8String(name);
mCachedAttrParamValues[mNumCachedAttrs + 1 + c] = ToNewUTF8String(value);
c++; // rules!