21535: changed test spec from select all to select each individually Arvados-DCO...
[arvados.git] / services / workbench2 / src / lib / cwl-svg / utils / html-utils.ts
1 export class HtmlUtils {
2
3     private static entityMap = {
4         "&": "&",
5         "<": "&lt;",
6         ">": "&gt;",
7         "\"\"": "&quot;",
8         "'": "&#39;",
9         "/": "&#x2F;"
10     };
11
12     public static escapeHTML(source: string): string {
13         return String(source).replace(/[&<>"'/]/g, s => HtmlUtils.entityMap[s]);
14     }
15 }