diff --git a/tests/text_processing/tickets_data/PHPBB3-13641.html b/tests/text_processing/tickets_data/PHPBB3-13641.html
new file mode 100644
index 0000000000..1bd1c06dbb
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-13641.html
@@ -0,0 +1 @@
+[color=#FF0000]
- red
\ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-13641.txt b/tests/text_processing/tickets_data/PHPBB3-13641.txt
new file mode 100644
index 0000000000..58f324715e
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-13641.txt
@@ -0,0 +1 @@
+[c][color=#FF0000][/c] - [color=#FF0000]red[/color]
\ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-13641.xml b/tests/text_processing/tickets_data/PHPBB3-13641.xml
new file mode 100644
index 0000000000..451c5c69cd
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-13641.xml
@@ -0,0 +1,28 @@
+
+
+
+ bbcode_id
+ bbcode_tag
+ bbcode_helpline
+ display_on_posting
+ bbcode_match
+ bbcode_tpl
+ first_pass_match
+ first_pass_replace
+ second_pass_match
+ second_pass_replace
+
+
+ 13
+ c
+
+ 1
+ [c]{TEXT}[/c]
+ {TEXT}]]>
+
+
+
+ ${1}]]>
+
+
+