@rh-support/troubleshoot 2.7.21 → 2.7.22

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.
@@ -1,12 +1,10 @@
1
1
  import { ICaseComment } from '@cee-eng/hydrajs/@types/api/public/case';
2
2
  import { ICaseCommentNode, IGetCaseCommentsQueryResponse } from './types';
3
3
  /**
4
- * The GraphQL API HTML-encodes comment bodies on storage/retrieval
5
- * (e.g. > becomes >, & becomes &). Two-pass decode
6
- * handles both single- and double-encoded entities, plus numeric refs.
7
- *
8
- * TODO: The double-encoding is a backend bug in the Salesforce UIAPI — it encodes on both
9
- * write and read. Once the backend is fixed, replace with a single `unescape(text)` call.
4
+ * GraphQL Body__c values are HTML-encoded once for transport
5
+ * (e.g. < becomes &lt;, & becomes &amp;). Decode a single pass only —
6
+ * a second unescape would turn Quill's intentional text escapes
7
+ * (typed HTML) into live markup / CSS injection.
10
8
  */
11
9
  export declare function decodeHtmlEntities(text: string): string;
12
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mapCaseComment.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/mapCaseComment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAY1E;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,CAIrF;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG7E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAEvD;AAQD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CAC1C,CAaA;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CAoBvE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,6BAA6B,GAAG,SAAS,GAAG,YAAY,EAAE,CAOvG"}
1
+ {"version":3,"file":"mapCaseComment.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/mapCaseComment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAY1E;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,CAIrF;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG7E;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,CAEvD;AAQD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC;CAC1C,CAaA;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CAoBvE;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,6BAA6B,GAAG,SAAS,GAAG,YAAY,EAAE,CAOvG"}
@@ -9,17 +9,13 @@ function decodeNumericEntities(text) {
9
9
  .replaceAll(/&#(\d+);/g, (_, dec) => String.fromCodePoint(Number.parseInt(dec, 10)));
10
10
  }
11
11
  /**
12
- * The GraphQL API HTML-encodes comment bodies on storage/retrieval
13
- * (e.g. > becomes &amp;gt;, & becomes &amp;amp;). Two-pass decode
14
- * handles both single- and double-encoded entities, plus numeric refs.
15
- *
16
- * TODO: The double-encoding is a backend bug in the Salesforce UIAPI — it encodes on both
17
- * write and read. Once the backend is fixed, replace with a single `unescape(text)` call.
12
+ * GraphQL Body__c values are HTML-encoded once for transport
13
+ * (e.g. < becomes &lt;, & becomes &amp;). Decode a single pass only —
14
+ * a second unescape would turn Quill's intentional text escapes
15
+ * (typed HTML) into live markup / CSS injection.
18
16
  */
19
17
  export function decodeHtmlEntities(text) {
20
- let decoded = unescape(unescape(text));
21
- decoded = decodeNumericEntities(decoded);
22
- return decoded;
18
+ return decodeNumericEntities(unescape(text));
23
19
  }
24
20
  /**
25
21
  * Derives the comment author type with priority: Associate > Customer.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.7.21",
3
+ "version": "2.7.22",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -53,7 +53,7 @@
53
53
  "@progress/kendo-react-pdf": "^5.16.0",
54
54
  "@redux-devtools/extension": "^3.3.0",
55
55
  "@rh-support/components": "2.6.21",
56
- "@rh-support/react-context": "2.6.21",
56
+ "@rh-support/react-context": "2.6.22",
57
57
  "@rh-support/types": "2.0.30",
58
58
  "@rh-support/user-permissions": "2.6.19",
59
59
  "@rh-support/utils": "2.6.18",
@@ -129,5 +129,5 @@
129
129
  "defaults and supports es6-module",
130
130
  "maintained node versions"
131
131
  ],
132
- "gitHead": "b47efd73e7afe275c94a32a3a3ff8c76f4c45ec1"
132
+ "gitHead": "6ad6c5da605925eb548c99d7b48dfd53df42af2c"
133
133
  }