Skip to content

Commit

Permalink
XSS
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Nov 29, 2024
1 parent becd450 commit 6944cc0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
31 changes: 30 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@
"style-object-to-css-string": "^1.1.3",
"svgo": "^3.3.2",
"typedoc": "^0.26.7",
"unist-util-visit": "^5.0.0"
"unist-util-visit": "^5.0.0",
"xss": "^1.0.15"
},
"devDependencies": {
"@astrojs/ts-plugin": "^1.10.4",
Expand Down
3 changes: 2 additions & 1 deletion src/pages/marketplace/plugins/i/[...rest]/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { query } from './_graphql';
import s from './_style.module.css';
import { isVideo } from '~/components/VideoPlayer/graphql';
import { DraftModeQueryListener } from '~/components/DraftModeQueryListener';
import xss from 'xss';
const variables = {
slug: Astro.params.rest!,
Expand Down Expand Up @@ -78,7 +79,7 @@ const avatarUrl = getGravatarUrl(page.author.email);

<Prose>
<div class={s.documentation} data-monospace="true">
<Markdown of={page.readme} />
<Markdown of={xss(page.readme)} />
</div>
</Prose>
</div>
Expand Down

0 comments on commit 6944cc0

Please sign in to comment.