selection update
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
export function escapeChar(c) {
|
||||
if (c === "&") return "&";
|
||||
if (c === "<") return "<";
|
||||
if (c === ">") return ">";
|
||||
return c;
|
||||
}
|
||||
|
||||
export function escapeHtml(s) {
|
||||
return s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
Reference in New Issue
Block a user