Ignore leading and trailing whitespace for src and data attributes bug 96362 r=av sr=attinasi

This commit is contained in:
peterlubczynski%netscape.com 2001-09-28 03:29:24 +00:00
Родитель 8f2b5ad7cd
Коммит 7487a1bcc1
2 изменённых файлов: 4 добавлений и 0 удалений

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

@ -1014,6 +1014,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
//stream in the object source if there is one...
if (NS_CONTENT_ATTR_HAS_VALUE ==
mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::src, src)) {
src.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE); // trim leading and trailing whitespace
// Create an absolute URL
rv = NS_NewURI(getter_AddRefs(fullURL), src, baseURL);
if (NS_FAILED(rv)) {
@ -1025,6 +1026,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
}
else if (NS_CONTENT_ATTR_HAS_VALUE ==
mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::data, src)) {
src.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE); // trim leading and trailing whitespace
// Create an absolute URL
rv = NS_NewURI(getter_AddRefs(fullURL), src, baseURL);
if (NS_FAILED(rv)) {

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

@ -1014,6 +1014,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
//stream in the object source if there is one...
if (NS_CONTENT_ATTR_HAS_VALUE ==
mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::src, src)) {
src.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE); // trim leading and trailing whitespace
// Create an absolute URL
rv = NS_NewURI(getter_AddRefs(fullURL), src, baseURL);
if (NS_FAILED(rv)) {
@ -1025,6 +1026,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
}
else if (NS_CONTENT_ATTR_HAS_VALUE ==
mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::data, src)) {
src.Trim("\b\t\r\n ", PR_TRUE, PR_TRUE, PR_FALSE); // trim leading and trailing whitespace
// Create an absolute URL
rv = NS_NewURI(getter_AddRefs(fullURL), src, baseURL);
if (NS_FAILED(rv)) {