Skip to content

Commit b4446e2

Browse files
1 parent d7c27f5 commit b4446e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/functions.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function format_html($str, $from_encoding = FALSE) {
44
$res = $from_encoding ? mb_convert_encoding($str, 'utf-8', $from_encoding) : $str;
5-
$res = htmlentities($res, ENT_QUOTES | ENT_SUBSTITUTE, 'utf-8');
5+
$res = htmlentities($res, defined('ENT_SUBSTITUTE') ? (ENT_QUOTES | ENT_SUBSTITUTE) : ENT_QUOTES, 'utf-8');
66
return ($res || !$str) ? $res : '(' . strlen($str) . ' bytes)';
77
}
88

0 commit comments

Comments
 (0)