You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memos/web
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
1 year ago
..
public chore: tweak memo view display 1 year ago
src fix: code blocks of unknown languages cause HTML injection (#3711) 1 year ago
.eslintrc.json chore: update eslint config 1 year ago
.gitignore fix: docker-compose.dev.yaml (#2695) 2 years ago
.prettierrc.js feat: add system service (#2083) 2 years ago
README.md chore: tweak readme 1 year ago
components.json chore: use popover for update tag view setting 1 year ago
index.html fix: initial gomark wasm 1 year ago
package.json chore: use popover for update tag view setting 1 year ago
pnpm-lock.yaml chore: use popover for update tag view setting 1 year ago
postcss.config.js feat: use tailwindcss and show export btn 4 years ago
tailwind.config.js chore: use popover for update tag view setting 1 year ago
tsconfig.json refactor: update import prefix with alias (#1433) 2 years ago
vercel.json chore: add vercel.json 1 year ago
vite.config.ts refactor: implement s3 storage 1 year ago

README.md

The frontend of Memos