chiark / gitweb /
lint: check description for forbidden HTML tags: iframe, link, script, etc.
authorHans-Christoph Steiner <hans@eds.org>
Tue, 23 Jan 2018 16:13:49 +0000 (17:13 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 26 Jan 2018 09:18:41 +0000 (10:18 +0100)
fdroidserver/lint.py

index a5ed3637dcf35981463a689390a0612fa72bdb51..0f6252b02a1aae9aabe2fbcace59e95903418f61 100644 (file)
@@ -164,6 +164,10 @@ regex_checks = {
          _("Unnecessary leading space")),
         (re.compile(r'.*\s$'),
          _("Unnecessary trailing space")),
+        (re.compile(r'.*<(iframe|link|script).*'),
+         _("Forbidden HTML tags")),
+        (re.compile(r'''.*\s+src=["']javascript:.*'''),
+         _("Javascript in HTML src attributes")),
     ],
 }