Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Potential fix for code scanning alert no. 112: Incomplete multi-character sanitization

Richie McIlroyd0e4d65ec681
diff --git a/apps/web/utils/docs.ts b/apps/web/utils/docs.ts
index 3ba2367ff..fde533927 100644
--- a/apps/web/utils/docs.ts
+++ b/apps/web/utils/docs.ts
@@ -130,6 +130,7 @@ export function getDocSearchIndex(
.replace(/```[\s\S]*?```/g, "")
.replace(/<[^>]+>/g, "")
.replace(/[#*`[\]()]/g, "")
+ .replace(/[<>]/g, "")
.replace(/\n+/g, " ")
.trim()
.slice(0, 500);