Skip to content

Commit

Permalink
Add module as a type of <script>
Browse files Browse the repository at this point in the history
Recently, JavaScript module would be getting used because almost all
browsers support it, so `module` could also be added in
`VALID_JAVASCRIPT_TAG_TYPES` as a `type` of `<script>`.
  • Loading branch information
yykamei committed Dec 9, 2022
1 parent e8ae7cb commit a43ecb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module BetterHtml
module TestHelper
module SafeErb
class AllowedScriptType < Base
VALID_JAVASCRIPT_TAG_TYPES = ["application/ld+json", "text/javascript", "text/template", "text/html"]
VALID_JAVASCRIPT_TAG_TYPES = ["application/ld+json", "text/javascript", "text/template", "text/html", "module"]

def validate
script_tags.each do |tag, _|
Expand Down

0 comments on commit a43ecb7

Please sign in to comment.