MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / sanitizeUrl

Function sanitizeUrl

src/ifcchat/app.js:209–218  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

207}
208
209function sanitizeUrl(url) {
210 try {
211 const parsed = new URL(url, window.location.href);
212 if (["http:", "https:", "mailto:"].includes(parsed.protocol)) {
213 return parsed.href;
214 }
215 } catch {
216 }
217 return null;
218}
219
220function renderInlineMarkdown(text) {
221 const placeholders = [];

Callers 1

renderInlineMarkdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected