MCPcopy Create free account
hub / github.com/adobe/leonardo / sanitizeQueryString

Function sanitizeQueryString

docs/ui/src/js/utils.js:779–789  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

777}
778
779function sanitizeQueryString(string) {
780 const map = {
781 '<': '&lt;',
782 '>': '&gt;',
783 '"': '&quot;',
784 "'": '&#x27;',
785 '/': '&#x2F;'
786 };
787 const reg = /[<>"'/]/gi;
788 return string.replace(reg, (match) => map[match]);
789}
790
791export {
792 randomId,

Callers 3

updateParamsFunction · 0.90
paramSetupFunction · 0.90
addFromURLFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected