aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-10 16:05:56 -0700
committerzotlabs <mike@macgirvin.com>2017-10-10 16:05:56 -0700
commitf273815d8ff45a28b36bd5121c58422dfc28d0ff (patch)
treef51f4dbfe646b41c1016c85589701cdc44db40e7 /include/text.php
parent87970491441cb15462d3fe7a7641d2f2755cb45b (diff)
parent07ae4319501ac6edc024a849b4d060f171f27178 (diff)
downloadvolse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.tar.gz
volse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.tar.bz2
volse-hubzilla-f273815d8ff45a28b36bd5121c58422dfc28d0ff.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 80914747b..8a65be0d5 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3156,3 +3156,9 @@ function ellipsify($s,$maxlen) {
return mb_substr($s,0,$maxlen / 2) . '...' . mb_substr($s,mb_strlen($s) - ($maxlen / 2));
}
+
+function purify_filename($s) {
+ if(($s[0] === '.') || strpos($s,'/') !== false)
+ return '';
+ return $s;
+}