mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
fix: double escape in link content
We already escape the entire content and don't need to escape the link content a second time. Otherwise, when a link contains, for example, an apostrophe, it's double encoded to `&pos;` before being displayed on the page. Regression from #3222
This commit is contained in:
@@ -291,7 +291,7 @@ class Bbcode
|
||||
);
|
||||
$source = preg_replace_callback(
|
||||
'/\[url=(.*?)](.*?)\[\/url]/i',
|
||||
fn ($matches) => '<a href="'.$this->sanitizeUrl($matches[1]).'">'.e($matches[2]).'</a>',
|
||||
fn ($matches) => '<a href="'.$this->sanitizeUrl($matches[1]).'">'.$matches[2].'</a>',
|
||||
$source ?? ''
|
||||
);
|
||||
$source = preg_replace_callback(
|
||||
|
||||
Reference in New Issue
Block a user