From a5d6fea9581132a50942ade8f2ea98cdf6256c4f Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 23 Mar 2022 20:57:00 +0200 Subject: [PATCH] do not prefix empty path with preprocessor script, as it prevents client-side expansion --- api/src/Etemplate/Widget/Template.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Template.php b/api/src/Etemplate/Widget/Template.php index 005b49d4ad..a501e3df75 100644 --- a/api/src/Etemplate/Widget/Template.php +++ b/api/src/Etemplate/Widget/Template.php @@ -208,10 +208,14 @@ class Template extends Etemplate\Widget * This adds the server-side modification of eTemplates for web-components /api/etemplate.php. * * @param string $path - * @return string url + * @return string|null url */ public static function rel2url($path) { + if (empty($path)) + { + return null; // do not prefix empty path with preprocessor script, as it prevents client-side expansion + } return $GLOBALS['egw_info']['server']['webserver_url'].'/api/etemplate.php'. ($path[0] === '/' ? $path : preg_replace('#^'.self::VFS_TEMPLATE_PATH.'#', '', Api\Vfs::parse_url($path, PHP_URL_PATH))).'?'.