Skip to content

Commit

Permalink
Add support for more <script> types
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed May 22, 2014
1 parent 5532b23 commit 0823ed8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/lib/beautify-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@
}
} else if (tag_check === 'script' &&
(tag_complete.search('type') === -1 ||
(tag_complete.search('type') > -1 && tag_complete.search('text/javascript') > -1))) {
(tag_complete.search('type') > -1 &&
tag_complete.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/) > -1))) {
if (!peek) {
this.record_tag(tag_check);
this.tag_type = 'SCRIPT';
Expand Down

0 comments on commit 0823ed8

Please sign in to comment.