Files
ProxmoxVE-Local/scripts/core/api.func
MickLesk 47b8e54087 Prefer jq in json_escape with robust awk fallback
Prefer jq for JSON string encoding when available (uses jq -Rs) to guarantee correct escaping; otherwise use a safer awk-based fallback. Inputs are pre-sanitized to strip ANSI sequences and control characters, and the new awk routine processes characters one-by-one to correctly escape backslashes, quotes and tabs and to join lines as \n, avoiding gsub replacement pitfalls from the previous implementation.
2026-05-27 14:27:51 +02:00

54 KiB