From 36235835e89145b63780e6770af7cd3565676161 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 16 Dec 2014 23:52:54 +0100 Subject: [PATCH] Properly support an empty escape in Highlighter.class.php --- .../lib/system/bbcode/highlighter/Highlighter.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php b/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php index 64762f1911..fe0d2f055e 100644 --- a/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/highlighter/Highlighter.class.php @@ -177,7 +177,13 @@ abstract class Highlighter extends SingletonFactory { $opening = preg_quote($opening); $closing = preg_quote($closing); - $quotesRegEx .= $opening.'(?>[^'.$closing.$quotedEscapeSequence.']|'.$quotedEscapeSequence.'.)*'.$closing; + + if ($quotedEscapeSequence) { + $quotesRegEx .= $opening.'(?>[^'.$closing.$quotedEscapeSequence.']|'.$quotedEscapeSequence.'.)*'.$closing; + } + else { + $quotesRegEx .= $opening.'(?>[^'.$closing.$quotedEscapeSequence.'])*'.$closing; + } } if ($quotesRegEx !== '') { -- 2.20.1