diff --git a/assets/embed/public/js/application.js b/assets/embed/public/js/application.js
index a4e2b86f..12c73c70 100644
--- a/assets/embed/public/js/application.js
+++ b/assets/embed/public/js/application.js
@@ -89,7 +89,7 @@ Element.prototype.changeToDone = function(error, html) {
}
var toWebDavURL = function(url) {
- url = url.replace("/", "/webdav/")
+ url = url.replace(baseURL + "/", webdavURL + "/");
return window.location.origin + url
}
@@ -908,4 +908,4 @@ document.addEventListener("DOMContentLoaded", function(event) {
}
return false;
-});
+});
\ No newline at end of file
diff --git a/assets/embed/templates/base.tmpl b/assets/embed/templates/base.tmpl
index 7acb1bab..86f4e844 100644
--- a/assets/embed/templates/base.tmpl
+++ b/assets/embed/templates/base.tmpl
@@ -129,8 +129,8 @@
-
-
+
+