diff --git a/etemplate/js/et2_widget_image.js b/etemplate/js/et2_widget_image.js index b21cc04d97..1a5fe38312 100644 --- a/etemplate/js/et2_widget_image.js +++ b/etemplate/js/et2_widget_image.js @@ -224,7 +224,7 @@ var et2_image = expose(et2_baseWidget.extend([et2_IDetachedDOM], */ getMedia: function (_value) { - var base_url = egw(window).window.location.origin + egw.webserverUrl + "/"; + var base_url = egw.webserverUrl.match(/^\//,'ig')?egw(window).window.location.origin + egw.webserverUrl + '/':egw.webserverUrl + '/'; var mediaContent = []; if (_value) { diff --git a/etemplate/js/et2_widget_vfs.js b/etemplate/js/et2_widget_vfs.js index c0d2aef9ff..d75c340340 100644 --- a/etemplate/js/et2_widget_vfs.js +++ b/etemplate/js/et2_widget_vfs.js @@ -318,7 +318,7 @@ var et2_vfsMime = expose(et2_valueWidget.extend([et2_IDetachedDOM], */ getMedia: function (_value) { - var base_url = egw(window).window.location.origin + egw.webserverUrl; + var base_url = egw.webserverUrl.match(/^\//,'ig')?egw(window).window.location.origin + egw.webserverUrl:egw.webserverUrl; var mediaContent = []; if (_value && _value.mime && _value.mime.match(/video/,'ig')) {