From 441bead7ba6ab7e19e5d3d310a71c48558a970ae Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 15 Jul 2019 13:49:47 -0500 Subject: [PATCH] workaround bbcode parser voring brackets --- app/lib/formatter.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb index 3c6965a1b..9e06bcd4f 100644 --- a/app/lib/formatter.rb +++ b/app/lib/formatter.rb @@ -325,7 +325,9 @@ class Formatter def bbcode_formatter(html) begin + html.gsub!(/\[(?=\W)/, "\uf666") html = html.bbcode_to_html(false, BBCODE_TAGS, :enable, *BBCODE_TAGS.keys) + html.gsub!("\uf666", '[') rescue Exception => e end html