static $bare = array('requesttoken', 'accesstoken', 'userauthorization',
'postnotice', 'updateprofile', 'finishremotesubscribe');
+ const REGEX_TAG = '[^\/]+'; // [\pL\pN_\-\.]{1,64} better if we can do unicode regexes
+
static function get()
{
if (!Router::$inst) {
$m->connect('tag', array('action' => 'publictagcloud'));
$m->connect('tag/:tag/rss',
array('action' => 'tagrss'),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect('tag/:tag',
array('action' => 'tag'),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect('peopletag/:tag',
array('action' => 'peopletag'),
- array('tag' => '[a-zA-Z0-9]+'));
+ array('tag' => self::REGEX_TAG));
// groups
$m->connect($a.'/:tag',
array('action' => $a,
'nickname' => $nickname),
- array('tag' => '[a-zA-Z0-9]+'));
+ array('tag' => self::REGEX_TAG));
}
foreach (array('rss', 'groups') as $a) {
$m->connect('tag/:tag/rss',
array('action' => 'userrss',
'nickname' => $nickname),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect('tag/:tag',
array('action' => 'showstream',
'nickname' => $nickname),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect('rsd.xml',
array('action' => 'rsd',
foreach (array('subscriptions', 'subscribers') as $a) {
$m->connect(':nickname/'.$a.'/:tag',
array('action' => $a),
- array('tag' => '[a-zA-Z0-9]+',
+ array('tag' => self::REGEX_TAG,
'nickname' => Nickname::DISPLAY_FMT));
}
$m->connect(':nickname/tag/:tag/rss',
array('action' => 'userrss'),
array('nickname' => Nickname::DISPLAY_FMT),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect(':nickname/tag/:tag',
array('action' => 'showstream'),
array('nickname' => Nickname::DISPLAY_FMT),
- array('tag' => '[\pL\pN_\-\.]{1,64}'));
+ array('tag' => self::REGEX_TAG));
$m->connect(':nickname/rsd.xml',
array('action' => 'rsd'),