forked from GNUsocial/gnu-social
loop through args in common_markup_to_html
This commit is contained in:
parent
b72788d9ce
commit
28d0d9caad
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user