Skip to content

Commit 6b7f96a

Browse files
committed
format files
1 parent ae49991 commit 6b7f96a

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

src/routes/solid-router/reference/primitives/use-resolved-path.mdx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,35 @@ title: useResolvedPath
66
It contains the current resolved path as defined in the Route.
77

88
```js
9-
const path = useResolvedPath(() => '');
9+
const path = useResolvedPath(() => "");
1010

11-
// Parent Route path: /user/*
11+
// Parent Route path: /user/*
1212
console.log(path()); // /user
1313

14-
const path = useResolvedPath(() => 'a/b/c');
14+
const path = useResolvedPath(() => "a/b/c");
1515

16-
// Parent Route path: /user/*
16+
// Parent Route path: /user/*
1717
console.log(path()); // /user/a/b/c
1818

19-
const path = useResolvedPath(() => '/a/b/c'); // Note: /
19+
const path = useResolvedPath(() => "/a/b/c"); // Note: /
2020

21-
// Parent Route path: /user/*
21+
// Parent Route path: /user/*
2222
console.log(path()); // a/b/c
2323
```
2424

2525
Useful for making modular routers
2626

2727
```js
28-
const parentRoutePath = useResolvedPath(() => '');
29-
30-
return <>
31-
<h1>Module component layer</h1>
32-
<Router base={parentRoutePath()}> // Modular magic
33-
<Route path="/" component={() => <div>Index</div>}/>
34-
<Route path="/a" component={() => <div>AComponent</div>}/>
35-
</Router>
36-
</>
28+
const parentRoutePath = useResolvedPath(() => "");
29+
30+
return (
31+
<>
32+
<h1>Module component layer</h1>
33+
<Router base={parentRoutePath()}>
34+
{/* Modular magic */}
35+
<Route path="/" component={() => <div>Index</div>} />
36+
<Route path="/a" component={() => <div>AComponent</div>} />
37+
</Router>
38+
</>
39+
);
3740
```

src/routes/solid-start/guides/security.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This can also be achieved through an `onRequest` [middleware](/solid-start/refer
2828

2929
## Cross Site Scripting (XSS)
3030

31-
SolidStart automatically escape inserts and attributes in HTML.
31+
SolidStart automatically escape inserts and attributes in HTML.
3232
The exception is when HTML is inserted via the `innerHTML` property, which bypasses the escaping.
3333
Additionally, it's important to note that `<noscript>` are also outside of the purview of SolidStart, since those tags and its contents are evaluated even without JavaScript.
3434
It is important to sanitize any strings in attributes, especially when inside `<noscript>` tags.

0 commit comments

Comments
 (0)