20 lines
584 B
Python
20 lines
584 B
Python
# Reason why this is a .py file is because json sucks at some config stuff
|
|
# Ran via exec in its own little globals environment
|
|
# The dictionary "config" is passed through to the final script.
|
|
|
|
from html_sanitizer import sanitizer
|
|
from html_sanitizer import *
|
|
import copy
|
|
|
|
config = dict(sanitizer.DEFAULT_SETTINGS)
|
|
|
|
# Add your changes
|
|
config['tags'].add('img')
|
|
config['empty'].add('img')
|
|
config['attributes'].update({'img': ('src', )})
|
|
config['tags'].add('audio')
|
|
config['empty'].add('audio')
|
|
config['attributes'].update({'audio': ('src', 'controls')})
|
|
|
|
print("Done with XSS config")
|