Fix bug 212277. r=caillon, sr=darin

This commit is contained in:
bzbarsky%mit.edu 2003-07-15 07:01:16 +00:00
parent 1174feec39
commit e6f3eb1465
2 changed files with 4 additions and 7 deletions

View File

@ -3069,8 +3069,8 @@ nsGenericHTMLElement::AttrToURI(nsIAtom* aAttrName, nsAString& aAbsoluteURI)
{
nsAutoString attrValue;
nsresult rv = GetAttr(kNameSpaceID_None, aAttrName, attrValue);
if (rv == NS_CONTENT_ATTR_NOT_THERE) {
aAbsoluteURI.Truncate();
if (rv != NS_CONTENT_ATTR_HAS_VALUE) {
SetDOMStringToNull(aAbsoluteURI);
return NS_OK;
}
@ -3087,10 +3087,6 @@ nsGenericHTMLElement::AttrToURI(nsIAtom* aAttrName, nsAString& aAbsoluteURI)
attrValue, doc, baseURI);
if (NS_FAILED(rv)) {
if (rv != NS_ERROR_MALFORMED_URI) {
return rv;
}
// Just use the attr value as the result...
aAbsoluteURI = attrValue;
return NS_OK;

View File

@ -50,6 +50,7 @@
#include "nsIObjectInputStream.h"
#include "nsIObjectOutputStream.h"
#include "nsEscape.h"
#include "nsNetError.h"
static NS_DEFINE_CID(kThisSimpleURIImplementationCID,
NS_THIS_SIMPLEURI_IMPLEMENTATION_CID);
@ -158,7 +159,7 @@ nsSimpleURI::SetSpec(const nsACString &aSpec)
PRInt32 pos = spec.FindChar(':');
if (pos == -1)
return NS_ERROR_FAILURE;
return NS_ERROR_MALFORMED_URI;
mScheme.Truncate();
mPath.Truncate();