From f9837791a4b05dcb965a085a998c2f0b4aaa6e50 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Wed, 19 Feb 2020 16:00:55 -0600 Subject: fix bangtag and screenreader escape tags (`#``!!`, `#``!nosr ... ``#``!sr`) --- app/lib/bangtags.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb index d8e47cb8d..a48b87155 100644 --- a/app/lib/bangtags.rb +++ b/app/lib/bangtags.rb @@ -1193,8 +1193,6 @@ class Bangtags end end - chunk.gsub!("#\ufdd6!", '#!') unless chunk.blank? || chunk.frozen? - if chunk.present? && @tf_cmds.present? @tf_cmds.each do |tf_cmd| next if chunk.nil? || tf_cmd[0].nil? @@ -1313,6 +1311,8 @@ class Bangtags @user.save text = @chunks.join + text.gsub!("#\ufdd6!", '#!') + text.gsub!(/\ufdd3(.*)\ufdd4/m, '') text.gsub!(/\n\n+/, "\n") if @crunch_newlines text.strip! text = text.split("\n").map(&:strip).join("\n") if @strip_lines -- cgit