@salesforcedevs/docs-components 0.56.2-seo-test12 → 0.56.2-seo-test16

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": "0.56.2-seo-test12",
3
+ "version": "0.56.2-seo-test16",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -885,7 +885,14 @@ export default class AmfReference extends LightningElement {
885
885
  const urlPath = referenceUrl.substring(
886
886
  indexOfQueryParam >= 0 ? indexOfQueryParam : referenceUrl.length
887
887
  );
888
- return this.parseParams(urlPath).meta as string;
888
+ const meta = this.parseParams(urlPath).meta as string;
889
+ // Always get the meta query param encoded and decode it and store it for internal use
890
+ // This has 2 advantages,
891
+ // 1. Supports backward compatible meta query param, so there is no need for redirects.
892
+ // 2. Supports Prerender and Coveo for their crawling.
893
+ const encodedMeta = meta && this.getUrlEncoded(meta);
894
+ const decodedMeta = encodedMeta && decodeURIComponent(encodedMeta);
895
+ return decodedMeta || "";
889
896
  }
890
897
 
891
898
  /**
@@ -934,10 +941,6 @@ export default class AmfReference extends LightningElement {
934
941
  let type = "";
935
942
  if (this.isSpecBasedReference(referenceId)) {
936
943
  meta = this.getMetaFromUrl(referenceUrl);
937
- // Always get the meta query param encoded and decode it and store it for internal use
938
- // This has 2 advantages,
939
- // 1. Supports backward compatible meta query param, so there is no need for redirects.
940
- // 2. Supports Prerender and Coveo for their crawling.
941
944
  if (meta) {
942
945
  if (meta.includes(":")) {
943
946
  const metaInfo = meta.split(":");