File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,14 +130,14 @@ function buildDataPage() {
130130 version = pkg . version || version ;
131131 } catch ( _ ) { }
132132
133- const moduleMatch = html . match ( / < s c r i p t > ( [ \s \S ] * ?) < \/ s c r i p t > / ) ;
133+ const moduleMatch = html . match ( / < s c r i p t \b [ ^ > ] * > ( [ \s \S ] * ?) < \/ s c r i p t \s * > / i ) ;
134134 const moduleScript = moduleMatch ? moduleMatch [ 1 ] : '' ;
135135
136136 const js = [ inline ( chrome ) , moduleScript ] . join ( '\n\n' ) ;
137137
138138 const output = html
139139 . replace ( / < s t y l e > [ \s \S ] * ?< \/ s t y l e > / , `<style>\n${ css } \n</style>` )
140- . replace ( / < s c r i p t > [ \s \S ] * ?< \/ s c r i p t > / , `<script>\n${ js } \n</script>` )
140+ . replace ( / < s c r i p t \b [ ^ > ] * > [ \s \S ] * ?< \/ s c r i p t \s * > / i , `<script>\n${ js } \n</script>` )
141141 . replace ( / \{ \{ V E R S I O N \} \} / g, version )
142142 . replace ( / c o n s t A C T O R S = _ _ A C T O R S \| \| \[ \] ; / , actors . trim ( ) + '\n' + groupsJs + '\nconst ACTORS = __ACTORS || [];' ) ;
143143
You can’t perform that action at this time.
0 commit comments