Merge pull request #16650 from filamentphp/fix/markdown-sanitization

fix: Markdown sanitization
This commit is contained in:
Dan Harrin
2025-06-22 22:53:51 +01:00
committed by GitHub
3 changed files with 12 additions and 12 deletions
@@ -283,6 +283,10 @@ trait CanFormatState
]);
if ($isHtml) {
if ($this->isMarkdown()) {
$state = Str::markdown($state);
}
$state = Str::sanitizeHtml($state);
}
@@ -303,10 +307,6 @@ trait CanFormatState
$state = Str::words($state, $wordLimit, $this->getWordLimitEnd());
}
if ($isHtml && $this->isMarkdown()) {
$state = Str::markdown($state);
}
$prefix = $this->getPrefix();
$suffix = $this->getSuffix();
@@ -283,6 +283,10 @@ trait CanFormatState
]);
if ($isHtml) {
if ($this->isMarkdown()) {
$state = Str::markdown($state);
}
$state = Str::sanitizeHtml($state);
}
@@ -303,10 +307,6 @@ trait CanFormatState
$state = Str::words($state, $wordLimit, $this->getWordLimitEnd());
}
if ($isHtml && $this->isMarkdown()) {
$state = Str::markdown($state);
}
$prefix = $this->getPrefix();
$suffix = $this->getSuffix();
@@ -148,6 +148,10 @@ trait CanFormatState
]);
if ($isHtml) {
if ($this->isMarkdown()) {
$state = Str::markdown($state);
}
$state = Str::sanitizeHtml($state);
}
@@ -156,10 +160,6 @@ trait CanFormatState
$state = $state->toHtml();
}
if ($isHtml && $this->isMarkdown()) {
$state = Str::markdown($state);
}
$prefix = $this->getPrefix();
$suffix = $this->getSuffix();