Commit fd2f53eaa06dc44dfc472d228c528e2c55fd79ea
1 parent
6592cdc0
Exists in
master
and in
1 other branch
- escape html in markdown so that symbols like < can be used in latex formulas.
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
BUGS.md
1 | 1 | |
2 | 2 | BUGS: |
3 | 3 | |
4 | -- copiar perguntas de biblio-ti/ti-questions | |
5 | 4 | - tabelas nas perguntas radio/checkbox não ocupam todo o espaço como em question. |
6 | 5 | - servidor http com redirect para https. |
7 | 6 | - servir imagens/ficheiros. |
8 | 7 | - codemirror em textarea. |
9 | -- topicos virtuais nao deveriam aparecer. na construção da árvore os sucessores seriam ligados directamente aos predecessores. | |
8 | +- topicos virtuais nao deveriam aparecer. na construção da árvore os sucessores seriam ligados directamente aos predecessores. Ou então | |
10 | 9 | |
11 | 10 | |
12 | 11 | - reportar comentarios após submeter. |
... | ... | @@ -32,6 +31,7 @@ TODO: |
32 | 31 | |
33 | 32 | FIXED: |
34 | 33 | |
34 | +- "<" is not escaped in markdown. | |
35 | 35 | - Está a mostrar a solução em 'comments'!!! |
36 | 36 | - database: answers não tem referencia para o topico, so para question_ref |
37 | 37 | - melhorar markdown das tabelas. | ... | ... |
tools.py
... | ... | @@ -124,7 +124,7 @@ class HighlightRenderer(mistune.Renderer): |
124 | 124 | return fr'$$$ {text} $$$' |
125 | 125 | |
126 | 126 | |
127 | -markdown = MarkdownWithMath(HighlightRenderer(escape=False)) # hard_wrap=True to insert <br> on newline | |
127 | +markdown = MarkdownWithMath(HighlightRenderer(escape=True)) # hard_wrap=True to insert <br> on newline | |
128 | 128 | |
129 | 129 | def md_to_html(text, q=None): |
130 | 130 | return markdown(text) | ... | ... |