mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #16650 from filamentphp/fix/markdown-sanitization
fix: Markdown sanitization
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user