UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

9 lines (8 loc) 306 B
"use strict"; // Prevent XSS attacks, see https://github.com/vikejs/vike/pull/181#issuecomment-952846026 Object.defineProperty(exports, "__esModule", { value: true }); exports.sanitizeJson = sanitizeJson; function sanitizeJson(unsafe) { const safe = unsafe.replace(/</g, '\\u003c'); return safe; }