Skip to content

Commit

Permalink
Merge pull request #4442 from Roardom/fix-markdown-escape
Browse files Browse the repository at this point in the history
(Fix) HTML inside wikis and pages being escaped
  • Loading branch information
HDVinnie authored Jan 20, 2025
2 parents 6293168 + 23f1fb8 commit 4b212d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Models/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ public function setContentAttribute(?string $value): void
*/
public function getContentHtml(): string
{
return Markdown::convert((new Bbcode())->parse($this->content, false))->getContent();
return Markdown::convert(htmlspecialchars_decode((new Bbcode())->parse($this->content, false)))->getContent();
}
}
2 changes: 1 addition & 1 deletion app/Models/Wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ public function category(): \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function getContentHtml(): string
{
return Markdown::convert((new Bbcode())->parse($this->content, false))->getContent();
return Markdown::convert(htmlspecialchars_decode((new Bbcode())->parse($this->content, false)))->getContent();
}
}

0 comments on commit 4b212d0

Please sign in to comment.