fix: swap order of xss cleaning and bbcode parsing in bbcode preview

Follow up to #3497. Had it the wrong way around. We fixed XSS, but broke BBCode.
This commit is contained in:
Roardom
2024-02-08 14:42:36 +00:00
parent b823ade1b3
commit d44eb43c7c
+1 -1
View File
@@ -42,7 +42,7 @@ class BbcodeInput extends Component
final public function updatedIsPreviewEnabled(): void
{
if ($this->isPreviewEnabled) {
$this->contentHtml = htmlspecialchars((new AntiXSS())->xss_clean((new Bbcode())->parse($this->contentBbcode)), ENT_NOQUOTES);
$this->contentHtml = (new Bbcode())->parse(htmlspecialchars((new AntiXSS())->xss_clean($this->contentBbcode), ENT_NOQUOTES));
}
}