summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-05 00:46:53 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-05 00:46:53 +0000
commit6382d1d98ff4c769ee18d0a52635c163f40acfaf (patch)
tree6922a44aece5ac111dd27c0aaa365a7385f25b18 /lib
parentbd52139436ba6e43ead6fd6acff43a90a1224f04 (diff)
parent61a08c91d5475a6eaedc56d999a8814b48a0fbb5 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index 73410e289..b17a44bd8 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -581,10 +581,8 @@ function common_shorten_link($url, $reverse = false)
function common_xml_safe_str($str)
{
- $xmlStr = htmlentities(iconv('UTF-8', 'UTF-8//IGNORE', $str), ENT_NOQUOTES, 'UTF-8');
-
- // Replace control, formatting, and surrogate characters with '*', ala Twitter
- return preg_replace('/[\p{Cc}\p{Cf}\p{Cs}]/u', '*', $str);
+ // Neutralize control codes and surrogates
+ return preg_replace('/[\p{Cc}\p{Cs}]/u', '*', $str);
}
function common_tag_link($tag)