Issue 722: form onsubmit= isn't wrapped properly
http://code.google.com/p/google-caja/issues/detail?id=722
New issue report by felix8a:
<form> without onsubmit will emit onsubmit='return false'.
that's fine.
<form onsubmit=""> will emit the form tag without onsubmit.
<form onsubmit="return true"> will emit the form tag with a handler that
will allow the form to submit normally.
those are both problems.
reason:
1. plugin.DomAttributeConstraint.Factory.forTag() returns a constraint for
form elements that includes this method:
public Pair<String, String> attributeValueHtml(String attribName) {
if ("ONSUBMIT".equalsIgnoreCase(attribName)) {
return Pair.pair("try { ", " } finally { return false; }");
}
return Pair.pair("", "");
}
}
2. plugin.HtmlCompiler.compileDom() calls
Pair<String, String> wrapper = constraint.attributeValueHtml(name);
and later on, it ignores the wrapper returned, because xformForAttribute()
returns non-null.
Issue attributes:
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to
http://groups.google.com/group/google-caja-discuss
To unsubscribe, email [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---