MCPcopy Create free account
hub / github.com/Devographics/Monorepo / parseHtmlString

Function parseHtmlString

api/src/helpers/strings.ts:25–35  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

23}
24
25export const parseHtmlString = (s: string) => {
26 /*
27
28 Note: when parsing a message such as "the <strong> tag is **great**!",
29 we don't want the first <strong> to be treated as an actual HTML tag,
30 so we escape it first here.
31
32 */
33 const escapedString = escapeAnglesOutsideBackticks(s)
34 return marked.parse(escapedString)
35}
36
37export const sanitizeHtmlString = (s: string) =>
38 sanitizeHtml(s, {

Callers 2

getRawCommentsFunction · 0.90
getRawDataFunction · 0.90

Calls 1

Tested by

no test coverage detected