summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-03 21:47:39 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-03 21:47:39 +0000
commite632f3be6f48c187b8049f35756b25ae80be2f0b (patch)
tree0a1b39d01ed7033d1d8ab8e3a369e3addb87b099 /lib
parent798984381f9ee40681d1feb4a7bef72460fe39f2 (diff)
parent123f6d7d0cfa707e7a5167257978a46aaa7d2938 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib')
-rw-r--r--lib/router.php3
-rw-r--r--lib/util.php8
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/router.php b/lib/router.php
index 67b8b8ae6..060253eb5 100644
--- a/lib/router.php
+++ b/lib/router.php
@@ -107,6 +107,9 @@ class Router
$m->connect('main/'.$a, array('action' => $a));
}
+ $m->connect('main/sup/:seconds', array('action' => 'sup'),
+ array('seconds' => '[0-9]+'));
+
$m->connect('main/tagother/:id', array('action' => 'tagother'));
// these take a code
diff --git a/lib/util.php b/lib/util.php
index f08e70754..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)
@@ -723,7 +721,7 @@ function common_local_url($action, $args=null, $params=null, $fragment=null)
{
static $sensitive = array('login', 'register', 'passwordsettings',
'twittersettings', 'finishopenidlogin',
- 'api');
+ 'finishaddopenid', 'api');
$r = Router::get();
$path = $r->build($action, $args, $params, $fragment);