You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/01/13 09:28:34 UTC

[struts] branch WW-5117-evaluate-dynamic-attributes-cherrypick updated: WW-5117 Adjusts expression checking

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5117-evaluate-dynamic-attributes-cherrypick
in repository https://gitbox.apache.org/repos/asf/struts.git


The following commit(s) were added to refs/heads/WW-5117-evaluate-dynamic-attributes-cherrypick by this push:
     new 9c05422  WW-5117 Adjusts expression checking
9c05422 is described below

commit 9c05422bbe23383cd5a39d89ab14f9e26ac0ffb8
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Thu Jan 13 10:28:30 2022 +0100

    WW-5117 Adjusts expression checking
---
 core/src/main/java/org/apache/struts2/components/UIBean.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/struts2/components/UIBean.java b/core/src/main/java/org/apache/struts2/components/UIBean.java
index e010ead..85b3d1b 100644
--- a/core/src/main/java/org/apache/struts2/components/UIBean.java
+++ b/core/src/main/java/org/apache/struts2/components/UIBean.java
@@ -32,6 +32,7 @@ import org.apache.struts2.components.template.Template;
 import org.apache.struts2.components.template.TemplateEngine;
 import org.apache.struts2.components.template.TemplateEngineManager;
 import org.apache.struts2.components.template.TemplateRenderingContext;
+import org.apache.struts2.dispatcher.StaticContentLoader;
 import org.apache.struts2.util.ComponentUtils;
 import org.apache.struts2.util.TextProviderHelper;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
@@ -1278,7 +1279,7 @@ public abstract class UIBean extends Component {
             String attrValue = entry.getValue();
 
             if (!isValidTagAttribute(attrName)) {
-                if (ComponentUtils.altSyntax(getStack()) && ComponentUtils.containsExpression(attrValue) && !lazyEvaluation()) {
+                if (ComponentUtils.containsExpression(attrValue) && !lazyEvaluation()) {
                     String translated = TextParseUtil.translateVariables('%', attrValue, stack);
                     dynamicAttributes.put(attrName, ObjectUtils.defaultIfNull(translated, attrValue));
                 } else {