nsAutoString href(aValue); href.StripWhitespace(); aResult.SetStringValue(href);
aResult.SetStringValue(aValue);
nsHTMLBodyElement::StringToAttribute(nsIAtom* aAttribute,                                     const nsString& aValue,                                     nsHTMLValue& aResult){  if (aAttribute == nsHTMLAtoms::background) {    nsAutoString href(aValue);    href.StripWhitespace();    aResult.SetStringValue(href);    return NS_CONTENT_ATTR_HAS_VALUE;  }  if ((aAttribute == nsHTMLAtoms::bgcolor) ||      (aAttribute == nsHTMLAtoms::text) ||      (aAttribute == nsHTMLAtoms::link) ||      (aAttribute == nsHTMLAtoms::alink) ||      (aAttribute == nsHTMLAtoms::vlink)) {    nsGenericHTMLElement::ParseColor(aValue, aResult);    return NS_CONTENT_ATTR_HAS_VALUE;  }  if ((aAttribute == nsHTMLAtoms::marginwidth) ||      (aAttribute == nsHTMLAtoms::marginheight)) {    nsGenericHTMLElement::ParseValue(aValue, 0, aResult, eHTMLUnit_Pixel);    return NS_CONTENT_ATTR_HAS_VALUE;  }  return NS_CONTENT_ATTR_NOT_THERE;}