summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorzach <zach@controlyourself.ca>2008-11-03 16:16:53 -0500
committerzach <zach@controlyourself.ca>2008-11-03 16:16:53 -0500
commit485247e9011e08a6ff0b9a2ff3d7a60bad515a26 (patch)
tree41dd725a78d6792d06dfdba477bcb51a20905e6b /lib
parent854e208c05ae1cfb584911f93f70f81878d0dff1 (diff)
Twitter-compatible API - properly encode and decode UTF-8 HTML entities
darcs-hash:20081103211653-462f3-58a0ad41ab0426c21aceb04b4a91dc52559018d0.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.php b/lib/util.php
index 44c75156c..88841d3f6 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -708,7 +708,7 @@ function common_render_content($text, $notice) {
}
function common_render_text($text) {
- $r = htmlspecialchars($text);
+ $r = htmlentities($text, ENT_NOQUOTES, 'UTF-8');
$r = preg_replace('/[\x{0}-\x{8}\x{b}-\x{c}\x{e}-\x{19}]/', '', $r);
$r = preg_replace_callback('@https?://[^\]>\s]+@', 'common_render_uri_thingy', $r);