Completed
Push — master ( 707bed...180ffd )
by Daniel
26s queued 12s
created

escapeHtml.ts ➔ escapeHtml   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
1
function escapeHtml(unsafe: string): string  {
2
  return unsafe
3
    .replaceAll("&", "&")
4
    .replaceAll("<", "&lt;")
5
    .replaceAll(">", "&gt;")
6
    .replaceAll('"', "&quot;")
7
    .replaceAll("'", "&#039;");
8
}
9
10
export default escapeHtml;
11