]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
better output for registration confirmation
[quix0rs-gnu-social.git] / lib / util.php
index 05c5407cdb5b6db216254e8416f875b62ed2be62..07a344633bd8541ba4a492a31751696c343a37b5 100644 (file)
@@ -1933,7 +1933,16 @@ function common_confirmation_code($bits)
 
 function common_markup_to_html($c, $args=null)
 {
-    $c = preg_replace('/%%arg.(\w+)%%/', "{$args['\\1']}", $c);
+    if (is_null($args)) {
+        $args = array();
+    }
+
+    // XXX: not very efficient
+
+    foreach ($args as $name => $value) {
+        $c = preg_replace('/%%arg.'.$name.'%%/', $value, $c);
+    }
+
     $c = preg_replace('/%%user.(\w+)%%/e', "common_user_property('\\1')", $c);
     $c = preg_replace('/%%action.(\w+)%%/e', "common_local_url('\\1')", $c);
     $c = preg_replace('/%%doc.(\w+)%%/e', "common_local_url('doc', array('title'=>'\\1'))", $c);