Code coverage report for string/unescapeHtml.js

Statements: 100% (6 / 6)      Branches: 100% (2 / 2)      Functions: 100% (3 / 3)      Lines: 100% (5 / 5)     

All files » string/ » unescapeHtml.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 201           1 2           2     1      
define(function () {
 
    /**
     * Unescapes HTML special chars
     * @version 0.1.0 (2012/05/24)
     */
    function unescapeHtml(str){
        str = (str || '')
                    .replace(/&/g , '&')
                    .replace(/&lt;/g  , '<')
                    .replace(/&gt;/g  , '>')
                    .replace(/&#39;/g , "'")
                    .replace(/&quot;/g, '"');
        return str;
    }
 
    return unescapeHtml;
 
});