diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx
index 0c1e2c0c..0d553485 100644
--- a/src/components/rich_content/rich_content.jsx
+++ b/src/components/rich_content/rich_content.jsx
@@ -124,11 +124,18 @@ export default {
}
const renderMisskeyMarkdown = (content) => {
- // Untangle code blocks from
tags
+ // Untangle code blocks from
tags and other html encodings
const codeblocks = content.match(/(
)?(~~~|```)\w*
.+?
\2\1?/g)
if (codeblocks) {
codeblocks.forEach((pre) => {
- content = content.replace(pre, pre.replaceAll('
', '\n'))
+ content = content.replace(pre,
+ pre.replaceAll('
', '\n')
+ .replaceAll('&', '&')
+ .replaceAll('<', '<')
+ .replaceAll('>', '>')
+ .replaceAll('"', '"')
+ .replaceAll(''', "'")
+ )
})
}