Skip to content

Commit

Permalink
WW-5117 Adjusts expression checking
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Jan 13, 2022
1 parent b0e18e9 commit 9c05422
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/org/apache/struts2/components/UIBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
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;
Expand Down Expand Up @@ -1278,7 +1279,7 @@ public void setDynamicAttributes(Map<String, String> tagDynamicAttributes) {
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 {
Expand Down

0 comments on commit 9c05422

Please sign in to comment.