summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:12:53 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:12:53 -0400
commit5953d56fe2db5cf610cd13e3806d5596964592cf (patch)
treeac13561b0e647bc9a7c4bc522f714708a0ee2f64 /lib/util.php
parent60861760fc3bdc1cdea407e8ee21eb8c54e77b8f (diff)
parente21844c7e4d522faabede91d213b609f44e63100 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/util.php b/lib/util.php
index ad1044fa2..78b5a36f8 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)