{
    "mode": "perldoc",
    "parameter": "HTML::Mason::Escapes",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/HTML%3A%3AMason%3A%3AEscapes/json",
    "generated": "2026-06-16T22:44:39Z",
    "sections": {
        "NAME": {
            "content": "HTML::Mason::Escapes - Functions to escape text for Mason\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module contains functions for implementing Mason's substitution escaping feature. These\nfunctions may also be called directly.\n\nhtmlentitiesescape\nThis function takes a scalar reference and HTML-escapes it using the \"HTML::Entities\"\nmodule. By default, this module assumes that the string it is escaping is in ISO-8859-1 (pre\nPerl 5.8.0) or UTF-8 (Perl 5.8.0 onwards). If this is not the case for your data, you will\nwant to override this escape to do the right thing for your encoding. See the section on\nUser-defined Escapes in the Developer's Manual for more details on how to do this.\n\nurlescape\nThis takes a scalar reference and replaces any text it contains matching \"[^a-zA-Z0-9.-]\"\nwith the URL-escaped equivalent, a percent sign (%) followed by the hexadecimal number of\nthat character.\n\nbasichtmlescape\nThis function takes a scalar reference and HTML-escapes it, escaping the following\ncharacters: '&', '>', '<', and '\"'.\n\nIt is provided for those who wish to use it to replace (or supplement) the existing 'h'\nescape flag, via the Interpreter's \"setescape()\" method.\n\nThis function is provided in order to allow people to return the HTML escaping behavior in\n1.0x. However, this behavior presents a potential security risk of allowing cross-site\nscripting attacks. HTML escaping should always be done based on the character set a page is\nin. Merely escaping the four characters mentioned above is not sufficient. The quick summary\nof why is that for some character sets, characters other than '<' may be interpreted as a\n\"less than\" sign, meaning that just filtering '<' and '>' will not stop all cross-site\nscripting attacks. See http://www.megasecurity.org/Info/cross-sitescripting.txt for more\ndetails.\n",
            "subsections": []
        }
    },
    "summary": "HTML::Mason::Escapes - Functions to escape text for Mason",
    "flags": [],
    "examples": [],
    "see_also": []
}