We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 28d0d9ca authored by Evan Prodromou's avatar Evan Prodromou

loop through args in common_markup_to_html

parent b72788d9
......@@ -1937,7 +1937,12 @@ function common_markup_to_html($c, $args=null)
$args = array();
$c = preg_replace('/%%arg.(\w+)%%/', "{$args['\\1']}", $c);
// 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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment