Skip to content

Commit 1ffeef7

Browse files
Potential fix for pull request finding 'CodeQL / Incomplete multi-character sanitization'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 192c0a6 commit 1ffeef7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/sections/DashboardWorkspace.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const STEP_ICON = { grounding: Brain, planning: PencilRuler, validating: Clipboa
1717
// listed and breadcrumbed under its old name, which reads as "my edit didn't
1818
// save" even though it did.
1919
function titleFromHtml(html, fallback) {
20-
const strip = (s) => s.replace(/<[^>]*>/g, '').replace(/\s+/g, ' ').trim()
20+
const strip = (s) => s.replace(/[<>]/g, '').replace(/\s+/g, ' ').trim()
2121
const title = html.match(/<title[^>]*>([\s\S]*?)<\/title>/i)
2222
if (title && strip(title[1])) return strip(title[1]).slice(0, 120)
2323
const h1 = html.match(/<h1[^>]*>([\s\S]*?)<\/h1>/i)

0 commit comments

Comments
 (0)