mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-19 01:06:05 +01:00
added sanitize initializer
This commit is contained in:
parent
5b590d3455
commit
443ca0e663
1 changed files with 9 additions and 0 deletions
9
config/initializers/sanitize.rb
Normal file
9
config/initializers/sanitize.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
EVIL_TAGS = {
|
||||
elements: %w(quote a p i strong em del pre code table tr td th br ul ol li hr),
|
||||
attributes: {
|
||||
'a' => %w(href)
|
||||
},
|
||||
protocols: {
|
||||
'a' => { 'href' => ['http', 'https', :relative] }
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue