Don't resolve <form action=""> to the base uri. b=297761 r+sr=jst a=chofmann
git-svn-id: svn://10.0.0.236/trunk@175268 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -529,11 +529,28 @@ nsHTMLFormElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||
}
|
||||
|
||||
NS_IMPL_STRING_ATTR(nsHTMLFormElement, AcceptCharset, acceptcharset)
|
||||
NS_IMPL_URI_ATTR(nsHTMLFormElement, Action, action)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Enctype, enctype)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Method, method)
|
||||
NS_IMPL_STRING_ATTR(nsHTMLFormElement, Name, name)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFormElement::GetAction(nsAString& aValue)
|
||||
{
|
||||
nsresult rv = GetAttr(kNameSpaceID_None, nsHTMLAtoms::action, aValue);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (aValue.IsEmpty()) {
|
||||
// Avoid resolving action="" to the base uri, bug 297761.
|
||||
return NS_OK;
|
||||
}
|
||||
return GetURIAttr(nsHTMLAtoms::action, aValue);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFormElement::SetAction(const nsAString& aValue)
|
||||
{
|
||||
return SetAttr(kNameSpaceID_None, nsHTMLAtoms::action, aValue, PR_TRUE);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLFormElement::GetTarget(nsAString& aValue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user