aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-05 16:38:55 -0700
committerzotlabs <mike@macgirvin.com>2017-09-05 16:38:55 -0700
commit842a041a888434df7d6312db08ce805c5ee21bf7 (patch)
tree09d8332752c7add0cd6ce7e045153d7cb6c3e913 /include/text.php
parentd58f965b9ab58acd3f218cce3c9d428e27315045 (diff)
downloadvolse-hubzilla-842a041a888434df7d6312db08ce805c5ee21bf7.tar.gz
volse-hubzilla-842a041a888434df7d6312db08ce805c5ee21bf7.tar.bz2
volse-hubzilla-842a041a888434df7d6312db08ce805c5ee21bf7.zip
remove period from characters allowed in username, as this will mess up URL based content-type negotiation. It was previously disallowed but permitted a month or two ago after seeing Diaspora started allowing it. It's OK if they have it, but we can't; as many of our urls are based on username and theirs are primarily based on uid.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index ea21e2184..a3c2bbc08 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1984,14 +1984,14 @@ function is_a_date_arg($s) {
}
function legal_webbie($s) {
- if(! strlen($s))
+ if(! $s)
return '';
- // WARNING: This regex will not work in a federated environment.
+ // WARNING: This regex may not work in a federated environment.
// You will probably want something like
// preg_replace('/([^a-z0-9\_])/','',strtolower($s));
- $r = preg_replace('/([^a-z0-9\-\_\.])/','',strtolower($s));
+ $r = preg_replace('/([^a-z0-9\-\_])/','',strtolower($s));
$x = [ 'input' => $s, 'output' => $r ];
call_hooks('legal_webbie',$x);
@@ -2003,7 +2003,7 @@ function legal_webbie_text() {
// WARNING: This will not work in a federated environment.
- $s = t('a-z, 0-9, -, _, and . only');
+ $s = t('a-z, 0-9, -, and _ only');
$x = [ 'text' => $s ];
call_hooks('legal_webbie_text',$x);