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
Родитель 0b3da6afc0
Коммит e07d40ea6c
2 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -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!

Просмотреть файл

@ -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!