File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
packages/docsify-server-renderer Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,9 @@ export default class Renderer {
123123 this . _renderHtml ( 'cover' , await this . _render ( coverFile ) , 'cover' ) ;
124124 }
125125
126- const html = this . isRemoteUrl ? DOMPurify . sanitize ( this . html ) : this . html ;
126+ const html = this . isRemoteUrl
127+ ? DOMPurify . sanitize ( this . html , { ADD_TAGS : [ 'script' ] } )
128+ : this . html ;
127129 this . html = this . template ;
128130 return html ;
129131 }
Original file line number Diff line number Diff line change @@ -330,7 +330,9 @@ export function renderMixin(proto) {
330330 } ,
331331 tokens => {
332332 html = this . compiler . compile ( tokens ) ;
333- html = this . isRemoteUrl ? DOMPurify . sanitize ( html ) : html ;
333+ html = this . isRemoteUrl
334+ ? DOMPurify . sanitize ( html , { ADD_TAGS : [ 'script' ] } )
335+ : html ;
334336 callback ( ) ;
335337 next ( ) ;
336338 }
You can’t perform that action at this time.
0 commit comments