injections(html): input regex patterns (#4521)

* injections(html): input regex patterns

replaces regex part of #2577
This commit is contained in:
Benny Powers 2023-03-19 14:32:42 +02:00 committed by GitHub
parent 38f878a1cd
commit 4536156f32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,3 +54,13 @@
(#offset! @javascript 0 2 0 -2)) (#offset! @javascript 0 2 0 -2))
(comment) @comment (comment) @comment
; <input pattern="[0-9]"> or <input pattern=[0-9]>
(element (_
(tag_name) @_tagname (#eq? @_tagname "input")
((attribute
(attribute_name) @_attr [
(quoted_attribute_value (attribute_value) @regex)
(attribute_value) @regex
] (#eq? @_attr "pattern")))
))