Commit Graph

23 Commits (09c50a8419fc50cb30cc73b1d2a3212cc7ce8656)

Author SHA1 Message Date
Johnny 09c50a8419 fix: codeblock highlight 2 months ago
johnnyjoy 0b85cb567e chore(frontend): fix clsx 4 months ago
Steven 67c1a46346 chore: remove html renderer sanitizes 7 months ago
Steven c4b52c68b5 fix: max height of memo content compact mode 8 months ago
ti777777 6f3d5762ca
fix: iframe rendering (#3916)
* fix iframe rendering

* fix eslint check
9 months ago
Michel Heusschen 2dbf92f7f1
perf: reduce bundle size by 21% with direct icon imports (#3844) 9 months ago
andrigamerita d264f45979
fix: code blocks of unknown languages cause HTML injection (#3711)
* fix: code blocks of unknown languages cause HTML injection

A code block of unknown language (that is, a language not treated as special by Memos and not handled by highlight.js) should fall back on rendering its plaintext content. However, the content is never properly escaped before it is appended to the DOM, and thus any string that happens to contain HTML is unsafely rendered. This commit fixes the issue by ensuring that, when none of the previous cases handle the text, any HTML entities are escaped first.

* Update CodeBlock.tsx to conform to eslint
11 months ago
Steven e8ed437ca3 fix: purify html before render 1 year ago
Steven 584c669068 chore: tweak max width 1 year ago
Steven d8aeec993c chore: replace classnames with clsx 1 year ago
Dubzer 8ee56bd29f
feat: add code wrapping option on mobile devices (#3196)
* feat: add code wrapping option on mobile devices

* Minor changes

* oopsie
1 year ago
Steven 7d5f603482 chore: update compact view 1 year ago
Steven 4378816e44 chore: tweak i18n 1 year ago
Kristián 03d67d5a00
feat: add mermaid support in codeblock (#2971) 1 year ago
Steven a76b86f18a chore: fix highlight code 1 year ago
Steven c522e1450a chore: update codeblock style 1 year ago
Steven 8ce6a32aac feat: use gomark wasm in frontend 1 year ago
Steven 8c6292925e chore: update code block styles 1 year ago
Steven 932f636d84 chore: update codeblock renderer 1 year ago
Mark Zhao bd1cf62761
feat: enable iframe rendering in markdown code block (#2799)
* enable iframe rendering in code block

* fix eslint issue
1 year ago
Steven f563b58a85 chore: fix renderer props 1 year ago
Steven 96140f3875 chore: tweak dark mode styles 1 year ago
Steven a3feeceace chore: remove component v1 suffix 1 year ago