From 8226322e92b981cb82d94cff539215328643683f Mon Sep 17 00:00:00 2001 From: Zanz2 Date: Tue, 21 Nov 2017 11:42:42 +0100 Subject: [PATCH] Fixed open html tags on truncate --- app/helpers/protocols_io_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/protocols_io_helper.rb b/app/helpers/protocols_io_helper.rb index 8b9c15fb5..baedce371 100644 --- a/app/helpers/protocols_io_helper.rb +++ b/app/helpers/protocols_io_helper.rb @@ -191,12 +191,12 @@ module ProtocolsIoHelper text_end = reserved + @remaining - PIO_STEP_TOOLONG_LEN if text.length - reserved > @remaining text = - text[0..text_end] + + close_tags(text[0..text_end]) + t('protocols.protocols_io_import.too_long') @toolong = true end - @remaining -= (close_tags(text).length - reserved) - close_tags(text) + @remaining -= (text.length - reserved) + text end end