diff --git a/api/etemplate.php b/api/etemplate.php
index 43e6861669..aeef2f1750 100644
--- a/api/etemplate.php
+++ b/api/etemplate.php
@@ -175,6 +175,9 @@ function send_template()
return $tag . '>';
}, $str);
+ // replace just description, as they often contain >, like label="> %s"
+ $str = preg_replace('##s', '', $str);
+
// modify <(vfs-mime|link-string|link-list) --> #s', static function(array $matches)
+ $str = preg_replace_callback('#<(et2|records)-([a-z-]+)\s(.*?")\s*>\s*<#s', static function(array $matches)
{
$attrs = parseAttrs($matches[3]);