Skip to content

Commit ad42e91

Browse files
committed
Fix controls in xml detection
1 parent 02c8eda commit ad42e91

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ class XmlView extends UI5View instanceof XmlFile {
696696

697697
/**
698698
* TODO - consider - if this just copies all predicates - maybe this should be a subtype of XmlView
699-
* and we dont need a separate/parallel type for fragments vs views. this will become clear once
699+
* and we dont need a separate/parallel type for fragments vs views. this will become clear once
700700
*/
701701
class XmlFragment extends UI5Fragment instanceof XmlFile {
702702
XmlRootElement root;
@@ -736,7 +736,11 @@ class XmlFragment extends UI5Fragment instanceof XmlFile {
736736

737737
private newtype TUI5Control =
738738
TXmlControl(XmlElement control) {
739-
control.getFile().getName().matches(["%.view.xml", "%.fragment.xml"])
739+
control
740+
.(Locatable)
741+
.getFile()
742+
.getBaseName()
743+
.matches(["%.view.xml", "%.view.html", "%.fragment.xml"])
740744
} or
741745
TJsonControl(JsonObject control) {
742746
exists(JsonView view | control.getParent() = view.getRoot().getPropValue("content"))

0 commit comments

Comments
 (0)