使用text而非html保证markdown不会被修改
This commit is contained in:
@@ -513,7 +513,7 @@ if ($pr_flag) {
|
|||||||
|
|
||||||
$(".md").each(function () {
|
$(".md").each(function () {
|
||||||
<?php if (isset($OJ_MARKDOWN) && $OJ_MARKDOWN == "marked.js") { ?>
|
<?php if (isset($OJ_MARKDOWN) && $OJ_MARKDOWN == "marked.js") { ?>
|
||||||
$(this).html(marked.parse($(this).html()));
|
$(this).text(marked.parse($(this).html()));
|
||||||
<?php } else if (isset($OJ_MARKDOWN) && $OJ_MARKDOWN == "markdown-it") { ?>
|
<?php } else if (isset($OJ_MARKDOWN) && $OJ_MARKDOWN == "markdown-it") { ?>
|
||||||
const md = window.markdownit();
|
const md = window.markdownit();
|
||||||
md.set({
|
md.set({
|
||||||
@@ -521,7 +521,7 @@ if ($pr_flag) {
|
|||||||
linkify: true,
|
linkify: true,
|
||||||
typographer: true,
|
typographer: true,
|
||||||
})
|
})
|
||||||
$(this).html(md.render($(this).html()));
|
$(this).text(md.render($(this).html()));
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
});
|
});
|
||||||
// adding note for ```input1 ```output1 in description
|
// adding note for ```input1 ```output1 in description
|
||||||
|
|||||||
Reference in New Issue
Block a user