Merge pull request #2724 from TracksApp/add_obsidian

Add Obsidian support to the link sanitation
This commit is contained in:
Jyri-Petteri Paloposki 2022-01-31 12:23:19 +02:00 committed by GitHub
commit d553d47a37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ module RenderingHelper
config = relaxed_config
# add onenote and message protocols, allow a target
a_href_config = relaxed_config[:protocols]['a']['href'] + %w(onenote message)
a_href_config = relaxed_config[:protocols]['a']['href'] + %w[onenote message obsidian]
a_attributes = relaxed_config[:attributes]['a'] + ['target']
config = Sanitize::Config.merge(config, protocols: { 'a' => { 'href' => a_href_config } }, :attributes => { 'a' => a_attributes })