lib/redmine_web_server.js
function fixUnicode(txt) {
    txt = txt.replace(/\003/g, ' ');
    txt = txt.replace(/\004/g, ' ');
    txt = txt.replace(/(\r|\n)/g, ' ');
    txt = txt.replace(/[\u007f-\uffff]/g, function (c) {
        return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
    });
    return txt;
}
function fixUnicode(txt) {
    txt = txt.replace(/\003/g, ' ');
    txt = txt.replace(/\004/g, ' ');
    txt = txt.replace(/(\r|\n)/g, ' ');
    txt = txt.replace(/[\u007f-\uffff]/g, function (c) {
        return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
    });
    return txt;
}
function fixUnicode ( txt ) { txt = txt . replace ( / \003 / g , ' ' ) ; txt = txt . replace ( / \004 / g , ' ' ) ; txt = txt . replace ( / (\r|\n) / g , ' ' ) ; txt = txt . replace ( / [\u007f-\uffff] / g , function ( c ) { return '\\u' + ( '0000' + c . charCodeAt ( 0 ) . toString ( 16 ) ) . slice ( - 4 ) ; } ) ; return txt ; }
Fix Unicode String that would cause JSON.parse to fail
Fix Unicode String that would cause JSON . parse to fail