nsgm-cli 2.1.29 → 2.1.30

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.
@@ -38,9 +38,12 @@ export const getLocalApiPrefix = () => {
38
38
  return localApiPrefix;
39
39
  };
40
40
 
41
- export const handleXSS = (content: string) => {
42
- content = content || "";
43
- return content.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
41
+ export const handleXSS = (content: any) => {
42
+ if (content === null || content === undefined) {
43
+ return "";
44
+ }
45
+ const str = String(content);
46
+ return str.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
44
47
  };
45
48
 
46
49
  export const checkModalObj = (modalObj: {}, ignoreKeys: any = []) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nsgm-cli",
3
- "version": "2.1.29",
3
+ "version": "2.1.30",
4
4
  "description": "A CLI tool to run Next/Style-components and Graphql/Mysql fullstack project",
5
5
  "main": "index.js",
6
6
  "scripts": {