mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
update gems and migrate sanitize to newer version
This commit is contained in:
parent
64bd5b99c5
commit
4dfcc182da
2 changed files with 37 additions and 29 deletions
|
|
@ -27,10 +27,11 @@ module Tracks
|
|||
rendered = helpers.auto_link(rendered, :link => :urls)
|
||||
|
||||
# add onenote and message protocols
|
||||
Sanitize::Config::RELAXED[:protocols]['a']['href'] << 'onenote'
|
||||
Sanitize::Config::RELAXED[:protocols]['a']['href'] << 'message'
|
||||
config = Sanitize::Config.merge(Sanitize::Config::RELAXED,
|
||||
:protocols => { 'a' => {'href' => Sanitize::Config::RELAXED[:protocols]['a']['href'] + ['onenote', 'message']}}
|
||||
)
|
||||
|
||||
rendered = Sanitize.clean(rendered, Sanitize::Config::RELAXED)
|
||||
rendered = Sanitize.clean(rendered, config)
|
||||
return rendered.html_safe
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue