MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / escape

Function escape

libatomic/src/review/html.rs:404–410  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

402}
403
404fn escape(text: &str) -> String {
405 text.replace('&', "&")
406 .replace('<', "&lt;")
407 .replace('>', "&gt;")
408 .replace('"', "&quot;")
409 .replace('\'', "&#39;")
410}
411
412fn emit(document: Value, fallback: &str) -> CliResult<String> {
413 let data = serde_json::to_string(&document)

Callers 1

select_contextMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected