# HG changeset patch # User Daniel Dourvaris # Date 2019-03-01 09:02:46 # Node ID 74d317eec168f8f8b1cef7a12a921ed2306b3b5b # Parent c75dd264c5f748c55e73391632ccd00a07f03f99 markdown: fixed sanitization of checkbox extensions that removed "checked" attribute. - Fixes #5513 diff --git a/rhodecode/lib/bleach_whitelist.py b/rhodecode/lib/bleach_whitelist.py --- a/rhodecode/lib/bleach_whitelist.py +++ b/rhodecode/lib/bleach_whitelist.py @@ -70,7 +70,7 @@ markdown_attrs = { "abbr": ["title"], "acronym": ["title"], "pre": ["lang"], - "input": ["type", "disabled"] + "input": ["type", "disabled", "checked"] } standard_styles = [ diff --git a/rhodecode/lib/markdown_ext.py b/rhodecode/lib/markdown_ext.py --- a/rhodecode/lib/markdown_ext.py +++ b/rhodecode/lib/markdown_ext.py @@ -18,26 +18,11 @@ # RhodeCode Enterprise Edition, including its added features, Support services, # and proprietary license terms, please see https://rhodecode.com/licenses/ -import re - import markdown from mdx_gfm import GithubFlavoredMarkdownExtension # pragma: no cover -class FlavoredCheckboxPostprocessor(markdown.postprocessors.Postprocessor): - """ - Adds `flavored_checkbox_list` class to list of checkboxes - """ - - pattern = re.compile(r'^([*-]) \[([ x])\]') - - def run(self, html): - before = '