diff options
author | zotlabs <mike@macgirvin.com> | 2017-10-10 16:05:56 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-10-10 16:05:56 -0700 |
commit | f273815d8ff45a28b36bd5121c58422dfc28d0ff (patch) | |
tree | f51f4dbfe646b41c1016c85589701cdc44db40e7 /include/text.php | |
parent | 87970491441cb15462d3fe7a7641d2f2755cb45b (diff) | |
parent | 07ae4319501ac6edc024a849b4d060f171f27178 (diff) | |
download | volse-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.php | 6 |
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; +} |