From: Tim Düsterhus Date: Tue, 16 Dec 2014 22:52:54 +0000 (+0100) Subject: Properly support an empty escape in Highlighter.class.php X-Git-Tag: 2.1.0_Beta_2~17 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=36235835e89145b63780e6770af7cd3565676161;p=GitHub%2FWoltLab%2FWCF.git Properly support an empty escape in Highlighter.class.php --- 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 !== '') {