libs/ng-lib/src/lib/transfer-state/transfer-state.service.js
/**
 * we need to escape our HTML to prevent XXS,
 * It needs to be custom, because the content can already contain html-escaped sequences
 **/
we need to escape our HTML to prevent XXS,
It needs to be custom, because the content can already contain html-escaped sequences
we need to escape our HTML to prevent XXS It needs to be custom because the content can already contain html - escaped sequences
function escapeHtml(text) {
    const escapedText = {
        "'": '_~q~',
        $: '_~o~',
        '`': '_~b~',
        '/': '_~s~',
        '<': '_~l~',
        '>': '_~g~',
    };
    return (text
        .replace(/[\$`'<>\/]/g, (s) => escapedText[s])
        .replace(/\\\"/g, `_~d~`));
}
function escapeHtml ( text ) { const escapedText = { "'" : '_~q~' , $ : '_~o~' , '`' : '_~b~' , '/' : '_~s~' , '<' : '_~l~' , '>' : '_~g~' , } ; return ( text . replace ( / [\$`'<>\/] / g , ( s ) => escapedText [ s ] ) . replace ( / \\\" / g , ` ` ) ) ; }
we need to escape our HTML to prevent XXS,
 It needs to be custom, because the content can already contain html-escaped sequences
we need to escape our HTML to prevent XXS It needs to be custom because the content can already contain html - escaped sequences
/** escape the json */ /** replace escaped double-quotes with single */