Skip to content

Commit 2dd375b

Browse files
committed
Bindings: support HTML views
- Ensure HTML views are covered within TBindingStrings - Update test case to use a valid html view (.view.html)
1 parent af45f84 commit 2dd375b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/Bindings.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private class ContextBindingAttribute extends XmlAttribute {
1717
private newtype TBindingString =
1818
TBindingStringFromLiteral(StringLiteral stringLiteral) { stringLiteral.getValue().matches("{%}") } or
1919
TBindingStringFromXmlAttribute(XmlAttribute attribute) {
20-
attribute.getLocation().getFile() instanceof XmlView and
20+
attribute.getLocation().getFile() instanceof UI5View and
2121
attribute.getValue().matches("{%}")
2222
} or
2323
TBindingStringFromJsonProperty(JsonObject object, string propertyName) {

javascript/frameworks/ui5/test/lib/Bindings/Bindings.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
| test.html:5:11:5:31 | XML property binding: data-value to {/input} |
2-
| test.html:8:11:8:33 | XML property binding: data-content to {/input} |
31
| test.js:10:20:10:33 | Early JavaScript property binding: value to "{/root/name}" |
42
| test.js:21:28:21:34 | JavaScript context binding: oInput to "/root" |
53
| test.js:23:38:23:43 | Late JavaScript property binding: value to "name" |
@@ -9,6 +7,8 @@
97
| test.json:5:9:22:9 | JSON property binding: items to {/Base} |
108
| test.json:11:17:16:17 | JSON property binding: value to {input} |
119
| test.json:17:17:20:17 | JSON property binding: content to {path : /input, formatter : ".valueFormatter"} |
10+
| test.view.html:5:11:5:31 | XML property binding: data-value to {/input} |
11+
| test.view.html:8:11:8:33 | XML property binding: data-content to {/input} |
1212
| test.xml:2:5:2:28 | XML property binding: value to {foo} |
1313
| test.xml:3:5:3:29 | XML property binding: value to {/foo} |
1414
| test.xml:4:5:4:34 | XML property binding: value to {model>foo} |

0 commit comments

Comments
 (0)