Skip to content

Commit

Permalink
fix links in license upgrade modal
Browse files Browse the repository at this point in the history
  • Loading branch information
filipslezaklab committed Jan 11, 2025
1 parent e454755 commit ea931a1
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 7 deletions.
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"react-virtualized-auto-sizer": "^1.0.25",
"react-window": "^1.8.11",
"recharts": "^2.15.0",
"rehype-external-links": "^3.0.0",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"rxjs": "^7.8.1",
Expand Down
28 changes: 28 additions & 0 deletions web/pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions web/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ You can find out more about features like:
- External SSO
- Controlling VPN clients behavior
Full enterprise feature list: https://docs.defguard.net/enterprise/all-enteprise-features</br>
Licensing information: https://docs.defguard.net/enterprise/license
Full enterprise feature list: [https://docs.defguard.net/enterprise/all-enteprise-features](https://docs.defguard.net/enterprise/all-enteprise-features)</br>
Licensing information: [https://docs.defguard.net/enterprise/license](https://docs.defguard.net/enterprise/license)
`,
controls: {
cancel: 'Maybe later',
Expand Down
8 changes: 4 additions & 4 deletions web/src/i18n/i18n-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ type RootTranslation = {
​-​ ​E​x​t​e​r​n​a​l​ ​S​S​O​
​-​ ​C​o​n​t​r​o​l​l​i​n​g​ ​V​P​N​ ​c​l​i​e​n​t​s​ ​b​e​h​a​v​i​o​r​
​F​u​l​l​ ​e​n​t​e​r​p​r​i​s​e​ ​f​e​a​t​u​r​e​ ​l​i​s​t​:​ ​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​a​l​l​-​e​n​t​e​p​r​i​s​e​-​f​e​a​t​u​r​e​s​<​/​b​r​>​
​L​i​c​e​n​s​i​n​g​ ​i​n​f​o​r​m​a​t​i​o​n​:​ ​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​l​i​c​e​n​s​e​
​F​u​l​l​ ​e​n​t​e​r​p​r​i​s​e​ ​f​e​a​t​u​r​e​ ​l​i​s​t​:​ ​[​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​a​l​l​-​e​n​t​e​p​r​i​s​e​-​f​e​a​t​u​r​e​s​]​(​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​a​l​l​-​e​n​t​e​p​r​i​s​e​-​f​e​a​t​u​r​e​s​)​<​/​b​r​>​
​L​i​c​e​n​s​i​n​g​ ​i​n​f​o​r​m​a​t​i​o​n​:​ ​[​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​l​i​c​e​n​s​e​]​(​h​t​t​p​s​:​/​/​d​o​c​s​.​d​e​f​g​u​a​r​d​.​n​e​t​/​e​n​t​e​r​p​r​i​s​e​/​l​i​c​e​n​s​e​)
​ ​ ​ ​ ​ ​
*/
content: string
Expand Down Expand Up @@ -4936,8 +4936,8 @@ export type TranslationFunctions = {
- External SSO
- Controlling VPN clients behavior
Full enterprise feature list: https://docs.defguard.net/enterprise/all-enteprise-features</br>
Licensing information: https://docs.defguard.net/enterprise/license
Full enterprise feature list: [https://docs.defguard.net/enterprise/all-enteprise-features](https://docs.defguard.net/enterprise/all-enteprise-features)</br>
Licensing information: [https://docs.defguard.net/enterprise/license](https://docs.defguard.net/enterprise/license)
*/
content: () => LocalizedString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Markdown from 'react-markdown';
import rehypeExternalLinks from 'rehype-external-links';
import rehypeRaw from 'rehype-raw';
import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';

Expand Down Expand Up @@ -39,7 +40,19 @@ export const RenderMarkdown = ({ content }: Props) => {
return processedLines.join('\n');
};
return (
<Markdown rehypePlugins={[rehypeRaw, [rehypeSanitize, sanitizeSchema]]}>
<Markdown
rehypePlugins={[
rehypeRaw,
[rehypeSanitize, sanitizeSchema],
[
rehypeExternalLinks,
{
target: '_blank',
rel: ['nofollow', 'noreferrer', 'noopener'],
},
],
]}
>
{parse()}
</Markdown>
);
Expand Down

0 comments on commit ea931a1

Please sign in to comment.