{"record":{"id":"d7b673c208635eac","repo":"balderdashy/sails","slug":"usage-if-provided-dontunescapeonclient-should","errorCode":null,"errorMessage":"Usage: If provided, `dontUnescapeOnClient` should be either `true` or `false`","messagePattern":"Usage: If provided, `dontUnescapeOnClient` should be either `true` or `false`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/hooks/views/html-scriptify.js","lineNumber":118,"sourceCode":"      if (e.code === 'E_INVALID') {\n        throw new Error('Usage: If provided, `namespace` should be a string');\n      } else { throw e; }\n    }\n  }\n  else {\n    options.namespace = 'SAILS_LOCALS';\n  }//>-\n\n  // Verify `dontUnescapeOnClient` flag, if provided (or use default)\n  //\n  // > If special backwards-compatible support for older browsers is needed, or any\n  // > other customizations to the client-side escaping code are necessary, then\n  // > the built-in client-side escaping can be disabled using `dontUnescapeOnClient: true`.\n  if (!_.isUndefined(options.dontUnescapeOnClient)) {\n    try {\n      options.dontUnescapeOnClient = rttc.validate('boolean', options.dontUnescapeOnClient);\n    } catch (e) {\n      if (e.code === 'E_INVALID') { throw new Error('Usage: If provided, `dontUnescapeOnClient` should be either `true` or `false`'); }\n      else { throw e; }\n    }\n  }\n  else {\n    options.dontUnescapeOnClient = false;\n  }//>-\n\n  // console.log('options.data',options.data);\n  // console.log('_.keys(options.data)',_.keys(options.data));\n\n\n  //  ██████╗ ██╗   ██╗██╗██╗     ██████╗     ██╗  ██╗████████╗███╗   ███╗██╗\n  //  ██╔══██╗██║   ██║██║██║     ██╔══██╗    ██║  ██║╚══██╔══╝████╗ ████║██║\n  //  ██████╔╝██║   ██║██║██║     ██║  ██║    ███████║   ██║   ██╔████╔██║██║\n  //  ██╔══██╗██║   ██║██║██║     ██║  ██║    ██╔══██║   ██║   ██║╚██╔╝██║██║\n  //  ██████╔╝╚██████╔╝██║███████╗██████╔╝    ██║  ██║   ██║   ██║ ╚═╝ ██║███████╗\n  //  ╚═════╝  ╚═════╝ ╚═╝╚══════╝╚═════╝     ╚═╝  ╚═╝   ╚═╝   ╚═╝     ╚═╝╚══════╝\n  //","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/balderdashy/sails/blob/7b76422cc27823df033572bdda5c4910a68b697f/lib/hooks/views/html-scriptify.js#L100-L136","documentation":"Error \"Usage: If provided, `dontUnescapeOnClient` should be either `true` or `false`\" thrown in balderdashy/sails.","triggerScenarios":"Thrown at lib/hooks/views/html-scriptify.js:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b76422cc27823df033572bdda5c4910a68b697f","analyzedAt":"2026-09-01T04:01:57.104Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}