mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
Merge pull request #599 from ZmagoD/zd_SCI_1241
fix samples bug [SCI-1241]
This commit is contained in:
commit
cd503580b2
1 changed files with 5 additions and 7 deletions
|
@ -16,15 +16,13 @@ module InputSanitizeHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def custom_auto_link(text, options = {})
|
def custom_auto_link(text, options = {})
|
||||||
simple_format = options.fetch(:simple_format) { true }
|
simple_f = options.fetch(:simple_format) { true }
|
||||||
team = options.fetch(:team) { nil },
|
team = options.fetch(:team) { nil }
|
||||||
wrapper_tag = options.fetch(:wrapper_tag) { {} }
|
wrapper_tag = options.fetch(:wrapper_tag) { {} }
|
||||||
tags = options.fetch(:tags) { [] }
|
tags = options.fetch(:tags) { [] }
|
||||||
text = if simple_format
|
fromat_opt = wrapper_tag.merge(sanitize: false)
|
||||||
simple_format(sanitize_input(text), {}, wrapper_tag)
|
text = sanitize_input(text, tags)
|
||||||
else
|
text = simple_format(sanitize_input(text), {}, fromat_opt) if simple_f
|
||||||
sanitize_input(text, tags)
|
|
||||||
end
|
|
||||||
auto_link(
|
auto_link(
|
||||||
smart_annotation_parser(text, team),
|
smart_annotation_parser(text, team),
|
||||||
link: :urls,
|
link: :urls,
|
||||||
|
|
Loading…
Reference in a new issue