-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong implementation of method setHtmlBody() #16
Comments
I'm ok about making the change, but maybe it should still be an option. I could add a new configuration option for the module to choose whether or not you want to purify the html input. This would be useful in case the html text is coming from a user input. |
@nickcv-ln good, option is ok. |
@nickcv-ln Using |
@andrey-bahrachev if the html body is coming from a for the purifier prevents the user from injecting potential malicious code, so I still think it could be an option, I can default it to false |
the more I think about it the more I think you guys are right. I will just scrap the purifier from setHtmlBody |
Yeah, it makes sense to make it optional, but don't use the purifier inside the |
@andrey-bahrachev I see what you mean. Doing it now btw |
Cool, thanks a lot! |
@andrey-bahrachev looking at it right now the only way to do it on just the user input before I render the view is if I loop through every single parameter sent through the view and use the purifier on each one that is a string, basically ignoring every user input if they are part of an object sent as a parameter. If I do apply the purifier to the rendered view there is the issue that It might strip some code that the developer actually wanted to be there. |
Ah, that's right. |
pushed the new release! thanks @andrey-bahrachev and @allush |
Awesome! Thanks :) |
HtmlPurifier::process($html)
It cuts a lot of styles from the property "style". for example 'border-radius' excluded from result html.i think, that using
HtmlPurifier::process($html)
is the wrong approach. better to use a simple assignment.The text was updated successfully, but these errors were encountered: