@salesforcedevs/docs-components 1.34.1-doc-phase-redoc-1 → 1.34.1-doc-phase-redoc-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.34.1-doc-phase-redoc-1",
3
+ "version": "1.34.1-doc-phase-redoc-2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -1,10 +1,12 @@
1
1
  import { CoveoAnalyticsClient } from "coveo.analytics/dist/browser.mjs"; // This fix is required for Node 20 upgrade, so that Coveo analytics is loaded properly by LWR.
2
2
 
3
3
  export const oldVersionDocInfo = (latestVersionLink: string) => {
4
+ // encodeURI so the link can't break out of the href attribute (innerHTML sink)
5
+ const safeLink = encodeURI(latestVersionLink);
4
6
  return {
5
7
  title: "Newer Version Available",
6
- body: `This content describes an older version of this product.
7
- <a style="font-weight: bold;" href="${latestVersionLink}">View Latest</a>`
8
+ body: `This content describes an older version of this product.
9
+ <a style="font-weight: bold;" href="${safeLink}">View Latest</a>`
8
10
  };
9
11
  };
10
12