From 99d538af58a59368412cb7eb46f42a7e2bfc90ad Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 18 Apr 2011 09:03:43 -0400 Subject: [PATCH] docfiles can take arguments --- lib/util.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/util.php b/lib/util.php index 086372a780..05c5407cdb 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1931,8 +1931,9 @@ function common_confirmation_code($bits) // convert markup to HTML -function common_markup_to_html($c) +function common_markup_to_html($c, $args=null) { + $c = preg_replace('/%%arg.(\w+)%%/', "{$args['\\1']}", $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); -- 2.39.5