提交 faffa3ad 编写于 作者: M mindless

filter out some jelly internals from ${attrs} so they are not rendered in output

(f:textbox input tags have included attrs like nameAttr, valueAttr, ownerTag since r25876)


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@27233 71c3de6d-444a-0410-be80-ed276b4c234a
上级 4d23dc76
......@@ -71,6 +71,7 @@ public class MorphTagLibrary extends TagLibrary {
throw new IllegalArgumentException("Expected collection for exclusion but found :"+exclusion);
}
@Override
public void run(JellyContext context, XMLOutput output) throws JellyTagException {
AttributesImpl actual = new AttributesImpl();
......@@ -80,6 +81,10 @@ public class MorphTagLibrary extends TagLibrary {
if (meta!=null) {
for (Map.Entry<String,?> e : meta.entrySet()) {
String key = e.getKey();
// @see jelly.impl.DynamicTag.setAttribute() -- ${attrs} has duplicates with "Attr" suffix
if (key.endsWith("Attr") && meta.containsKey(key.substring(0, key.length()-4))) continue;
// @see http://github.com/hudson/jelly/commit/4ae67d15957b5b4d32751619997a3cb2a6ad56ed
if (key.equals("ownerTag")) continue;
if (!exclusions.contains(key)) {
Object v = e.getValue();
if (v!=null)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册