HEX
Server: Apache
System: Linux 4485441ca2e2 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 11:03:07 UTC 2025 aarch64
User: (1000)
PHP: 8.2.24
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/wordpress-popular-posts/src/Block/utils.js
export function escape_html(value) {
    const map = {
        '&': '&',
        '<': '&lt;',
        '>': '&gt;',
        '"': '&quot;',
        "'": '&#x27;',
        "/": '&#x2F;',
        '`': '&grave;',
    };
    const reg = /[&<>"'/]/ig;
    return value.replace(reg, (match)=>(map[match]));
}

export function unescape_html(value) {
    var div = document.createElement('div');
    div.innerHTML = value;
    var child = div.childNodes[0];
    return child ? child.nodeValue : '';
}