File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
routes/solid-start/guides Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ title: Security
55## XSS (Cross Site Scripting)
66
77Solid automatically escape values passed to JSX expressions to reduce the risk of XSS attacks.
8- However, this protection does not apply when using [ ` innerHTML ` ] ( /reference/jsx-attributes/innerhtml-or-textcontent#innerhtml-or-textcontent ) .
8+ However, this protection does not apply when using [ ` innerHTML ` ] ( /reference/jsx-attributes/innerhtml ) .
99
1010To protect your application from XSS attacks:
1111
Original file line number Diff line number Diff line change @@ -3,13 +3,11 @@ import { Icon } from "solid-heroicons";
33import { exclamationTriangle } from "solid-heroicons/outline" ;
44import { useI18n } from "~/i18n/i18n-context" ;
55import { getEntryFileName } from "~/i18n/helpers" ;
6+ import { useLocation } from "@solidjs/router" ;
67
78export const PageIssueLink : Component = ( ) => {
89 const i18n = useI18n ( ) ;
9-
10- const [ mounted , setMounted ] = createSignal ( false ) ;
11-
12- onMount ( ( ) => setMounted ( true ) ) ;
10+ const location = useLocation ( ) ;
1311
1412 const srcPath = createMemo ( ( ) => {
1513 return (
@@ -20,7 +18,7 @@ export const PageIssueLink: Component = () => {
2018 "&template=CONTENT.yml" +
2119 "&title=[Content]:" +
2220 `&subject=${ getEntryFileName ( ) } ` +
23- `&page=${ mounted ( ) ? window . location . href : "" } `
21+ `&page=${ `https://docs.solidjs.com/ ${ location . pathname } ` } `
2422 ) ;
2523 } ) ;
2624
You can’t perform that action at this time.
0 commit comments