From a6d70a05a1a8f830fb2b2de47428613fdc65e235 Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Mon, 31 Jan 2022 12:06:47 +0200 Subject: [PATCH] Add Obsidian support to the link sanitation --- app/helpers/rendering_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/rendering_helper.rb b/app/helpers/rendering_helper.rb index 60c6b3c6..956e93d9 100644 --- a/app/helpers/rendering_helper.rb +++ b/app/helpers/rendering_helper.rb @@ -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 })