diff options
author | Mario <mario@mariovavti.com> | 2024-02-21 10:44:56 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-02-21 10:44:56 +0000 |
commit | 17e2877c91dfc889ab5edb62fc6e00dd7dcbba01 (patch) | |
tree | 27ec3a55fd853caec3877cadb1b80433b00a00b3 /include | |
parent | b7bc28c33356e95f4d45a7d5d2585e67ebd04648 (diff) | |
download | volse-hubzilla-17e2877c91dfc889ab5edb62fc6e00dd7dcbba01.tar.gz volse-hubzilla-17e2877c91dfc889ab5edb62fc6e00dd7dcbba01.tar.bz2 volse-hubzilla-17e2877c91dfc889ab5edb62fc6e00dd7dcbba01.zip |
make sure to decode html special chars before sending over the wire and
Diffstat (limited to 'include')
-rw-r--r-- | include/text.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php index 9d276642a..052c26594 100644 --- a/include/text.php +++ b/include/text.php @@ -114,6 +114,13 @@ function escape_tags($string) { return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false)); } +function unescape_tags($string) { + if (!$string) { + return EMPTY_STR; + } + return (htmlspecialchars_decode($string, ENT_COMPAT)); +} + /** * Escape URL's so they're safe for use in HTML and in HTML element attributes. */ |