From 2e6bab46387ebd1f8051e43f130cf6261288f9a1 Mon Sep 17 00:00:00 2001 From: Anton Ignatov Date: Thu, 9 May 2019 09:40:40 +0200 Subject: [PATCH] Fix smart anottation to protocols in repository --- app/controllers/protocols_controller.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index af64cbc1a..358abe39b 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -3,6 +3,9 @@ class ProtocolsController < ApplicationController include RenamingUtil include ProtocolsImporter include ProtocolsExporter + include ActionView::Helpers::TextHelper + include ActionView::Helpers::UrlHelper + include ApplicationHelper include InputSanitizeHelper include ProtocolsIoHelper include TeamsHelper @@ -222,9 +225,11 @@ class ProtocolsController < ApplicationController if @protocol.update(description: params.require(:protocol)[:description]) TinyMceAsset.update_images(@protocol, params[:tiny_mce_images]) render json: { - html: sanitize_input( - @protocol.tinymce_render(:description) - ) + html: custom_auto_link( + @protocol.tinymce_render(:description), + simple_format: false, + tags: %w(img), + team: current_team) } else render json: @protocol.errors, status: :unprocessable_entity