diff --git a/content/html/content/src/nsHTMLAnchorElement.cpp b/content/html/content/src/nsHTMLAnchorElement.cpp
index 4503ab7e848e..3c07948823e1 100644
--- a/content/html/content/src/nsHTMLAnchorElement.cpp
+++ b/content/html/content/src/nsHTMLAnchorElement.cpp
@@ -226,9 +226,7 @@ nsHTMLAnchorElement::StringToAttribute(nsIAtom* aAttribute,
return NS_CONTENT_ATTR_HAS_VALUE;
}
if (aAttribute == nsHTMLAtoms::href) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
if (aAttribute == nsHTMLAtoms::suppress) {
diff --git a/content/html/content/src/nsHTMLBodyElement.cpp b/content/html/content/src/nsHTMLBodyElement.cpp
index 5d4e0d9b7496..2ad98e6846ef 100644
--- a/content/html/content/src/nsHTMLBodyElement.cpp
+++ b/content/html/content/src/nsHTMLBodyElement.cpp
@@ -592,9 +592,7 @@ nsHTMLBodyElement::StringToAttribute(nsIAtom* aAttribute,
nsHTMLValue& aResult)
{
if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
if ((aAttribute == nsHTMLAtoms::bgcolor) ||
diff --git a/content/html/content/src/nsHTMLImageElement.cpp b/content/html/content/src/nsHTMLImageElement.cpp
index 4858f13c48fa..a384cce1cfbf 100644
--- a/content/html/content/src/nsHTMLImageElement.cpp
+++ b/content/html/content/src/nsHTMLImageElement.cpp
@@ -231,9 +231,7 @@ nsHTMLImageElement::StringToAttribute(nsIAtom* aAttribute,
if ((aAttribute == nsHTMLAtoms::usemap) ||
(aAttribute == nsHTMLAtoms::src) ||
(aAttribute == nsHTMLAtoms::lowsrc)) {
- nsAutoString tmp(aValue);
- tmp.StripWhitespace();
- aResult.SetStringValue(tmp);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (nsGenericHTMLElement::ParseImageAttribute(aAttribute,
diff --git a/content/html/content/src/nsHTMLTableCellElement.cpp b/content/html/content/src/nsHTMLTableCellElement.cpp
index 015932e2e028..d91902015970 100644
--- a/content/html/content/src/nsHTMLTableCellElement.cpp
+++ b/content/html/content/src/nsHTMLTableCellElement.cpp
@@ -367,9 +367,7 @@ nsHTMLTableCellElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/content/html/content/src/nsHTMLTableElement.cpp b/content/html/content/src/nsHTMLTableElement.cpp
index 812df91c9885..b6ccc2ebcda3 100644
--- a/content/html/content/src/nsHTMLTableElement.cpp
+++ b/content/html/content/src/nsHTMLTableElement.cpp
@@ -894,9 +894,7 @@ nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/content/html/content/src/nsHTMLTableRowElement.cpp b/content/html/content/src/nsHTMLTableRowElement.cpp
index 6b6ab6874739..cd201a396b2f 100644
--- a/content/html/content/src/nsHTMLTableRowElement.cpp
+++ b/content/html/content/src/nsHTMLTableRowElement.cpp
@@ -520,9 +520,7 @@ nsHTMLTableRowElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/content/html/content/src/nsHTMLTableSectionElement.cpp b/content/html/content/src/nsHTMLTableSectionElement.cpp
index fa345e4417bd..2b5ce68c84ab 100644
--- a/content/html/content/src/nsHTMLTableSectionElement.cpp
+++ b/content/html/content/src/nsHTMLTableSectionElement.cpp
@@ -242,9 +242,7 @@ nsHTMLTableSectionElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/layout/html/content/src/nsHTMLAnchorElement.cpp b/layout/html/content/src/nsHTMLAnchorElement.cpp
index 4503ab7e848e..3c07948823e1 100644
--- a/layout/html/content/src/nsHTMLAnchorElement.cpp
+++ b/layout/html/content/src/nsHTMLAnchorElement.cpp
@@ -226,9 +226,7 @@ nsHTMLAnchorElement::StringToAttribute(nsIAtom* aAttribute,
return NS_CONTENT_ATTR_HAS_VALUE;
}
if (aAttribute == nsHTMLAtoms::href) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
if (aAttribute == nsHTMLAtoms::suppress) {
diff --git a/layout/html/content/src/nsHTMLBodyElement.cpp b/layout/html/content/src/nsHTMLBodyElement.cpp
index 5d4e0d9b7496..2ad98e6846ef 100644
--- a/layout/html/content/src/nsHTMLBodyElement.cpp
+++ b/layout/html/content/src/nsHTMLBodyElement.cpp
@@ -592,9 +592,7 @@ nsHTMLBodyElement::StringToAttribute(nsIAtom* aAttribute,
nsHTMLValue& aResult)
{
if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
if ((aAttribute == nsHTMLAtoms::bgcolor) ||
diff --git a/layout/html/content/src/nsHTMLImageElement.cpp b/layout/html/content/src/nsHTMLImageElement.cpp
index 4858f13c48fa..a384cce1cfbf 100644
--- a/layout/html/content/src/nsHTMLImageElement.cpp
+++ b/layout/html/content/src/nsHTMLImageElement.cpp
@@ -231,9 +231,7 @@ nsHTMLImageElement::StringToAttribute(nsIAtom* aAttribute,
if ((aAttribute == nsHTMLAtoms::usemap) ||
(aAttribute == nsHTMLAtoms::src) ||
(aAttribute == nsHTMLAtoms::lowsrc)) {
- nsAutoString tmp(aValue);
- tmp.StripWhitespace();
- aResult.SetStringValue(tmp);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (nsGenericHTMLElement::ParseImageAttribute(aAttribute,
diff --git a/layout/html/content/src/nsHTMLLayerElement.cpp b/layout/html/content/src/nsHTMLLayerElement.cpp
index e2944083551d..fd701043a34b 100644
--- a/layout/html/content/src/nsHTMLLayerElement.cpp
+++ b/layout/html/content/src/nsHTMLLayerElement.cpp
@@ -186,9 +186,7 @@ nsHTMLLayerElement::StringToAttribute(nsIAtom* aAttribute,
{
// XXX CLIP
if (aAttribute == nsHTMLAtoms::src) {
- nsAutoString src(aValue);
- src.StripWhitespace();
- aResult.SetStringValue(src);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if ((aAttribute == nsHTMLAtoms::top) ||
@@ -216,9 +214,7 @@ nsHTMLLayerElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString url(aValue);
- url.StripWhitespace();
- aResult.SetStringValue(url);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
diff --git a/layout/html/content/src/nsHTMLTableCellElement.cpp b/layout/html/content/src/nsHTMLTableCellElement.cpp
index 015932e2e028..d91902015970 100644
--- a/layout/html/content/src/nsHTMLTableCellElement.cpp
+++ b/layout/html/content/src/nsHTMLTableCellElement.cpp
@@ -367,9 +367,7 @@ nsHTMLTableCellElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/layout/html/content/src/nsHTMLTableElement.cpp b/layout/html/content/src/nsHTMLTableElement.cpp
index 812df91c9885..b6ccc2ebcda3 100644
--- a/layout/html/content/src/nsHTMLTableElement.cpp
+++ b/layout/html/content/src/nsHTMLTableElement.cpp
@@ -894,9 +894,7 @@ nsHTMLTableElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/layout/html/content/src/nsHTMLTableRowElement.cpp b/layout/html/content/src/nsHTMLTableRowElement.cpp
index 6b6ab6874739..cd201a396b2f 100644
--- a/layout/html/content/src/nsHTMLTableRowElement.cpp
+++ b/layout/html/content/src/nsHTMLTableRowElement.cpp
@@ -520,9 +520,7 @@ nsHTMLTableRowElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {
diff --git a/layout/html/content/src/nsHTMLTableSectionElement.cpp b/layout/html/content/src/nsHTMLTableSectionElement.cpp
index fa345e4417bd..2b5ce68c84ab 100644
--- a/layout/html/content/src/nsHTMLTableSectionElement.cpp
+++ b/layout/html/content/src/nsHTMLTableSectionElement.cpp
@@ -242,9 +242,7 @@ nsHTMLTableSectionElement::StringToAttribute(nsIAtom* aAttribute,
}
}
else if (aAttribute == nsHTMLAtoms::background) {
- nsAutoString href(aValue);
- href.StripWhitespace();
- aResult.SetStringValue(href);
+ aResult.SetStringValue(aValue);
return NS_CONTENT_ATTR_HAS_VALUE;
}
else if (aAttribute == nsHTMLAtoms::bgcolor) {