Files
zoneminder/tests/js
Nic BoetandClaude Opus 5.5 18a0a64462 fix: show an event's Name, Cause and Notes as text in the event view
getStat() built each cell of the event details table as an HTML string
and set it with .html(), so a Name, Cause or Notes holding markup was
rendered as markup instead of shown as its text, both on page load and
after each stream status reply (ajax/status.php returns them as stored).
Escape the event's values with escapeHTML() before they join the cell's
own markup; the monitor name, storage name and path the same way, and
encode the path in the files link.

event.js.php wrote the Cause into a single-quoted JS string through
validHtmlStr(), which escapes quotes but not backslashes: a Cause ending
in a backslash broke the view's script, and a backslash before a newline
was dropped. Hand it over with json_encode() as Name and Notes already
are; getStat() escapes it now, so the value is no longer pre-escaped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 23:51:38 -05:00
..