HTML Sanitizer
#42827
Replies: 1 comment
-
This would be really nice when a sanitizer option is available in Laravel core. The Symfony Sanitizer looks nice to implement |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Looks like Symfony has a stable release of their HTML Sanitizer. I was wondering if it wouldn't be cool to have something like that upstream in the Laravel core. Maybe something like:
Assuming the body field there has HTML on it, the
s()
function would sanitize the content and return an instance ofHtmlString
.It could ship only with the Element Baseline and allow app-land code to override it using a callable, something like:
This being in the core would mean more eyes on how sanitization is done.
Beta Was this translation helpful? Give feedback.
All reactions