Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

Revert "markdown: Escape lang when echoing back custom non-pygments languages."

Anders Kaseorgac5cbf76930d
diff --git a/zerver/lib/markdown/fenced_code.py b/zerver/lib/markdown/fenced_code.py
index 55092bf157c..65cbdc53030 100644
--- a/zerver/lib/markdown/fenced_code.py
+++ b/zerver/lib/markdown/fenced_code.py
@@ -415,12 +415,7 @@ class FencedBlockPreprocessor(markdown.preprocessors.Preprocessor):
# still tag it with the user's data-code-language
# value, since this allows hooking up a "playground"
# for custom "languages" that aren't known to Pygments.
- #
- # The escaping isn't strictly necessary, in that the
- # characters allowed for language values should all be
- # safe, but doing escaping here makes it easy to
- # reason about.
- code_language = self._escape(lang)
+ code_language = lang
div_tag.attrib['data-code-language'] = code_language
code = lxml.html.tostring(div_tag, encoding="unicode")