libs/scully/src/lib/systemPlugins/writeToFs.plugin.js
/**
 * Unescape our custom escaped texts
 * @param text
 */
Unescape our custom escaped texts
@param text
Unescape our custom escaped texts @param text
function unescapeHtml(text) {
    const unescapedText = {
        '_~q~': "'",
        '_~b~': '`',
        '_~o~': '$',
        '_~s~': '/',
        '_~l~': '<',
        '_~g~': '>',
    };
    return (text
        .replace(/_~d~/g, `\\"`)
        .replace(/_~[^]~/g, (s) => unescapedText[s])
        .replace(/\n/g, '\\n')
        .replace(/\r/g, '\\r'));
}
function unescapeHtml ( text ) { const unescapedText = { '_~q~' : "'" , '_~b~' : '`' , '_~o~' : '$' , '_~s~' : '/' , '_~l~' : '<' , '_~g~' : '>' , } ; return ( text . replace ( / _~d~ / g , ` \\ ` ) . replace ( / _~[^]~ / g , ( s ) => unescapedText [ s ] ) . replace ( / \n / g , '\\n' ) . replace ( / \r / g , '\\r' ) ) ; }
Unescape our custom escaped texts
 @param text
Unescape our custom escaped texts @param text
/** put back escaped double quotes to make valid json again */ /** replace the custom escapes */ /** restore newlines+cr */