about summary refs log tree commit diff
path: root/app/lib/formatter.rb
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-15 13:49:47 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-15 14:12:24 -0500
commit441bead7ba6ab7e19e5d3d310a71c48558a970ae (patch)
tree5b109feaf325e3e02fc9440fcc04d7d94b248d7f /app/lib/formatter.rb
parent45408c3c01a830e6bfd1941994bbeb94582a45f0 (diff)
workaround bbcode parser voring brackets
Diffstat (limited to 'app/lib/formatter.rb')
-rw-r--r--app/lib/formatter.rb2
1 files changed, 2 insertions, 0 deletions
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