Add decodeHtml helper to runtime logs for consistent HTML entity handling
Applies the same fix from deployment logs to runtime logs (GetLogs component). Prevents HTML entities like " from appearing when search highlighting is applied to logs containing special characters. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7bb14d1d9c
commit
8a4303cc02
1 changed files with 5 additions and 1 deletions
|
|
@ -104,6 +104,10 @@
|
|||
const range = selection.getRangeAt(0);
|
||||
return logsContainer.contains(range.commonAncestorContainer);
|
||||
},
|
||||
decodeHtml(text) {
|
||||
const doc = new DOMParser().parseFromString(text, 'text/html');
|
||||
return doc.documentElement.textContent;
|
||||
},
|
||||
applySearch() {
|
||||
const logs = document.getElementById('logs');
|
||||
if (!logs) return;
|
||||
|
|
@ -121,7 +125,7 @@
|
|||
|
||||
// Update highlighting
|
||||
if (textSpan) {
|
||||
const originalText = textSpan.dataset.lineText || '';
|
||||
const originalText = this.decodeHtml(textSpan.dataset.lineText || '');
|
||||
if (!query) {
|
||||
textSpan.textContent = originalText;
|
||||
} else if (matches) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue