aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index f5b1803c2..1beefc6eb 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3124,6 +3124,12 @@ function cleanup_bbcode($body) {
}
+function gen_link_id($mid) {
+ if(strpbrk($mid,':/&?<>"\'') !== false)
+ return 'b64.' . base64url_encode($mid);
+ return $mid;
+}
+
// callback for array_walk
function array_trim(&$v,$k) {
@@ -3132,4 +3138,5 @@ function array_trim(&$v,$k) {
function array_escape_tags(&$v,$k) {
$v = escape_tags($v);
-} \ No newline at end of file
+}
+