We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c20d9f commit 9e65e7aCopy full SHA for 9e65e7a
public/js/extra.js
@@ -330,7 +330,12 @@ export function finishView (view) {
330
})
331
// gist
332
view.find('code[data-gist-id]').each((key, value) => {
333
- if ($(value).children().length === 0) { $(value).gist(window.viewAjaxCallback) }
+ if ($(value).children().length === 0) {
334
+ // strip HTML tags to avoid stored XSS
335
+ const gistid = value.getAttribute('data-gist-id')
336
+ value.setAttribute('data-gist-id', stripTags(gistid))
337
+ $(value).gist(window.viewAjaxCallback)
338
+ }
339
340
// sequence diagram
341
const sequences = view.find('div.sequence-diagram.raw').removeClass('raw')
0 commit comments