Skip to content

Commit

Permalink
refine ZK-5018
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu committed Dec 13, 2023
1 parent f7c6085 commit 6328a7d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,7 @@ private static String modifyAttrValueIfSimplified(String attrName, String attrVa
String nm = null;
char quot = (char) 0;
int paramIndex = -1;
int inRoundBrackets = 0;
for (int j = 0;; ++j) {
if (j >= len) {
modifiedCommandPropertySb.append(modifyAttrValueIfSimplified0(nm, sb.toString().trim(), paramIndex, isNamedParam));
Expand All @@ -1127,12 +1128,16 @@ private static String modifyAttrValueIfSimplified(String attrName, String attrVa
sb.setLength(0); //cleanup
paramIndex++;
continue; //next name=value
} else if (cc == '=') {
} else if (cc == '=' && inRoundBrackets == 0) {
nm = sb.toString().trim(); //name found
sb.setLength(0); //cleanup
continue; //parse value
} else if (cc == '\'' || cc == '"') {
quot = cc;
} else if (cc == '(') {
inRoundBrackets++;
} else if (cc == ')') {
inRoundBrackets--;
}
} else if (cc == quot) {
quot = (char) 0;
Expand Down

0 comments on commit 6328a7d

Please sign in to comment.