We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0692568 commit 1f4fc7fCopy full SHA for 1f4fc7f
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/pages/[id].jsx
@@ -0,0 +1,17 @@
1
+export default function Post({ id, q }) {
2
+ return (
3
+ <>
4
+ <div dangerouslySetInnerHTML={{__html: id }} />
5
+ <div dangerouslySetInnerHTML={{__html: q }} />
6
+ </>
7
+ )
8
+}
9
+
10
+export async function getServerSideProps(context) {
11
+ return {
12
+ props: {
13
+ id: context.params?.id || "",
14
+ q: context.query?.foobar || "",
15
+ }
16
17
javascript/ql/test/query-tests/Security/CWE-079/DomBasedXss/pages/[id].tsx
0 commit comments