Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d1558d7

Browse files
committed
docs: evaluate only scripts with type text/javascript
1 parent 5b0d068 commit d1558d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/templates/doc_widgets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ angular.module('ngdocs.directives', [], function($compileProvider) {
3333
//jqlite instead. jqlite's find() method currently supports onlt getElementsByTagName!
3434
var example = element.find('pre').eq(0), //doc-source
3535
scriptSrc = '',
36-
htmlSrc = example.text().replace(/<script[^\>]*>([\s\S]+)<\/script>/im, function(_, script) {
36+
htmlSrc = example.text().replace(/<script(\s+type="text\/javascript")?>([\s\S]+)<\/script>/im, function(_, type, script) {
3737
scriptSrc = script;
3838
return '';
3939
}),

0 commit comments

Comments
 (0)