-
Notifications
You must be signed in to change notification settings - Fork 282
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
Make notes, comments and announcements markdown aware #3814
Make notes, comments and announcements markdown aware #3814
Conversation
936ec10
to
5ef2c55
Compare
I don't see why we should limit the allowed tags or CSS attributes for either text or line. We had kind of the same problem with the the plugin output. We added more and more allowed tags and CSS attributes over time. I think users would like the full flexibility. The default configuration should be sufficient in terms of security. Maybe we should consider setting Parsedown's safe mode to |
Tags are not limited anymore. I've just omitted the esoteric ones such as e.g. Enabling safe mode is a good idea, yes. Though, prior allowing all attributes I'd verify that things like The Markdown class doesn't need to cache anything as the Parsedown class already caches its own instance and caching the HtmlPurifier does not help much. I'd rather introduce a cache directory. |
5ef2c55
to
97fe893
Compare
Removed the attribute limitations. HtmlPurifier is already smart enough to remove all risky ones. (e.g. Parsedown's safe mode however also escapes any raw markup and only allows markdown syntax. And now switching over to only markdown doesn't seem right. So safe mode is not an option. |
Sounds good. But the HTML tags are still limited. Why not just allow them all? |
97fe893
to
c6a61f9
Compare
c6a61f9
to
bd20607
Compare
0ee9715
to
6659e28
Compare
Removed tag limitations and dropped the distinction between phrasing and block level content. It's all everything now. Also, HtmlPurifier now got its own cache directory in our file cache. |
6659e28
to
6aa2cf6
Compare
Adds a new view helper
Markdown
which allows to transform markdown.$this->markdown($text)
At the moment markdown is transformed for notes, comments and announcements. (yep, I thought this suits here as well)
resolves #3684
resolves #3441
resolves #2831