Frontmatter
| id | 8450 |
| title | Add validation to Markdown component to reject HTML 404 responses |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 9, 2026, 9:37 AM |
| updatedAt | Jan 9, 2026, 9:39 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8450 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 9, 2026, 9:39 AM |
Add validation to Markdown component to reject HTML 404 responses
tobiu assigned to @tobiu on Jan 9, 2026, 9:39 AM

tobiu
Jan 9, 2026, 9:39 AM
Input from Gemini 3 Pro:
✦ Implemented
beforeSetValueinNeo.component.Markdownto intercept values starting with<!DOCTYPE html>or<html. This prevents the component from rendering 404 error pages as content, which previously caused CSP warnings and rendering artifacts.
tobiu closed this issue on Jan 9, 2026, 9:39 AM
When fetching markdown files via AJAX, a 404 error often returns a full HTML page. This causes the Markdown component to render a full DOM tree inside itself, triggering CSP warnings like: "The Content Security Policy ... was delivered via a element outside the document's
"Changes:
beforeSetValueinNeo.component.Markdown.<!DOCTYPE html>or<html).oldValue.