projects
/
arvados.git
/ blob
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
17653: Upgrades merge.
[arvados.git]
/
src
/
lib
/
cwl-svg
/
utils
/
html-utils.ts
1
export class HtmlUtils {
2
3
private static entityMap = {
4
"&": "&",
5
"<": "<",
6
">": ">",
7
"\"\"": """,
8
"'": "'",
9
"/": "/"
10
};
11
12
public static escapeHTML(source: string): string {
13
return String(source).replace(/[&<>"'\/]/g, s => HtmlUtils.entityMap[s]);
14
}
15
}