From baebf56fb26bd061fecff7bd5bd6da03adbc08b0 Mon Sep 17 00:00:00 2001 From: nathangray Date: Fri, 2 Oct 2020 12:37:20 -0600 Subject: [PATCH] Merge: Fix {{link}} placeholder was incorrectly wrapped in HREF tag. Use {{link/href}} for that now. --- api/src/Storage/Merge.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index 480a07c8e2..1ab574d294 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -439,7 +439,17 @@ abstract class Merge // Prepend site if ($link[0] == '/') $link = Api\Framework::getUrl($link); - $array['$$'.($prefix?$prefix.'/':'').$placeholder.'$$'] = Api\Html::a_href(Api\Html::htmlspecialchars($title), $link); + // Formatting + if($matches[2][$i] == 'title') + { + $link = $title; + } + else if($matches[2][$i] == 'href') + { + $link = Api\Html::a_href(Api\Html::htmlspecialchars($title), $link); + } + + $array['$$'.($prefix?$prefix.'/':'').$placeholder.'$$'] = $link; break; case 'links': $link_app = $matches[3][$i] ? $matches[3][$i] : '!'.Api\Link::VFS_APPNAME;