use wcf\system\message\embedded\object\MessageEmbeddedObjectManager;
use wcf\system\request\RouteHandler;
use wcf\system\WCF;
+use wcf\util\StringUtil;
/**
* Parses the [quote] bbcode tag.
$quoteAuthor = (!empty($openingTag['attributes'][0]) ? $openingTag['attributes'][0] : '');
$quoteAuthorObject = null;
if ($quoteAuthor && !$externalQuoteLink) {
- $quoteAuthorLC = mb_strtolower($quoteAuthor);
+ $quoteAuthorLC = mb_strtolower(StringUtil::decodeHTML($quoteAuthor));
foreach (MessageEmbeddedObjectManager::getInstance()->getObjects('com.woltlab.wcf.quote') as $user) {
if (mb_strtolower($user->username) == $quoteAuthorLC) {
$quoteAuthorObject = $user;
*/
public static function getFirstParameters($message, $bbcode) {
$pattern = '~\['.$bbcode.'=
- (?:\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|([^,\]]*))
+ (\'(?:[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|(?:[^,\]]*))
(?:,(?:\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|[^,\]]*))*
\]~ix';
if (preg_match_all($pattern, $message, $matches)) {
+ foreach ($matches[1] as &$value) {
+ // remove quotes
+ if (mb_substr($value, 0, 1) == "'" && mb_substr($value, -1) == "'") {
+ $value = str_replace("\'", "'", $value);
+ $value = str_replace("\\\\", "\\", $value);
+
+ $value = mb_substr($value, 1, -1);
+ }
+ }
+
$results = ArrayUtil::trim($matches[1]);
- $results = array_merge($results, ArrayUtil::trim($matches[2]));
$results = array_unique($results);
return $results;