syntax-highlighting.py: add nonce-source to CSP support
This commit is contained in:
parent
d05ebe3b64
commit
6535be64b9
@ -49,7 +49,7 @@ except TypeError:
|
|||||||
|
|
||||||
# highlight! :-)
|
# highlight! :-)
|
||||||
# printout pygments' css definitions as well
|
# printout pygments' css definitions as well
|
||||||
sys.stdout.write('<style>')
|
sys.stdout.write('<style nonce="8909ab9">')
|
||||||
sys.stdout.write(formatter.get_style_defs('.highlight'))
|
sys.stdout.write(formatter.get_style_defs('.highlight'))
|
||||||
sys.stdout.write('</style>')
|
sys.stdout.write('</style>')
|
||||||
sys.stdout.write(highlight(data, lexer, formatter, outfile=None))
|
sys.stdout.write(highlight(data, lexer, formatter, outfile=None))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user