recognize more HTML attribute concatenations

This commit is contained in:
Erik Krogh Kristensen
2020-05-26 12:36:24 +02:00
parent 5fb76df44f
commit a9bea63019

View File

@@ -51,8 +51,11 @@ module IncompleteHtmlAttributeSanitization {
string lhs;
HtmlAttributeConcatenation() {
lhs = this.getPreviousLeaf().getStringValue().regexpCapture("(.*)=\"[^\"]*", 1) and
this.getNextLeaf().getStringValue().regexpMatch(".*\".*")
lhs = this.getPreviousLeaf().getStringValue().regexpCapture("((?:[\n\r]|.)*)=\"[^\"]*", 1) and
(
this.getNextLeaf().getStringValue().regexpMatch(".*\".*") or
this.getRoot().getConstantStringParts().regexpMatch("(?:[\n\r]|.)*</.*")
)
}
/**