function safeSerialize(data) {
    return data != null
        ? JSON.stringify(data).replace(/\//g, '\\/')
        : 'undefined';
}
// Ensures string values are safe to be used within a <script> tag.
Ensures string values are safe to be used within a 
Ensures string values are safe to be used within a
function safeSerialize(data) {
    return data != null
        ? JSON.stringify(data).replace(/\//g, '\\/')
        : 'undefined';
}
function safeSerialize ( data ) { return data != null ? JSON . stringify ( data ) . replace ( / \/ / g , '\\/' ) : 'undefined' ; }
Ensures string values are safe to be used within a <script> tag.
Ensures string values are safe to be used within a <script > tag .