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
Markdown: Proper GFM support and rendering consistency between front and back #2341
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abulte
approved these changes
Nov 27, 2019
'tbody', | ||
'thead', | ||
'tfooter', | ||
# 'title', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
|
||
|
||
@front.app_template_filter() | ||
def embedded_json_ld(jsonld): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related to markdown somehow?
abulte
added a commit
that referenced
this pull request
Mar 11, 2020
### Breaking changes - Migration to Python 3.7 [#1766](#1766) - The new migration system ([#1956](#1956)) uses a new python based format. Pre-2.0 migrations are not compatible so you might need to upgrade to the latest `udata` version `<2.0.0`, execute migrations and then upgrade to `udata` 2+. - The targeted mongo version is now Mongo 3.6. Backward support is not guaranteed ### New features - New migration system [#1956](#1956): - Use python based migrations instead of relying on mongo internal and deprecated `js_exec` - Handle rollback (optionnal) - Detailled history - Template hooks generalization: allows to dynamically extend template with widgets and snippets from extensions. See [the dedicated documentation section](https://udata.readthedocs.io/en/stable/extending/#hooks) [#2323](#2323) - Markdown now supports [Github Flavored Markdown (GFM) specs](https://github.github.com/gfm/) (ie. the already supported [CommonMark specs](https://spec.commonmark.org) plus tables, strikethrough, autolinks support and predefined disallowed raw HTML) [#2341](#2341)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR change the backend markdown implementation from
commonmark-py
tomistune
which is faster and support GFM (ie. strikethrough, tables...).This also fixes:
description
field which should be a raw text field and was a mix of raw and html strings (without proper escapign which was a security issue) (See: https://w3c.github.io/json-ld-syntax/#restrictions-for-contents-of-json-ld-script-elements)mdstrip
which was rendering twice (and so was creating a small performance hit)As the GFM specs gives a list of unauthorized tags, the
MD_ALLOWED_TAGS
could be removed (not done here but could be)