diff --git a/applications/luci-app-lxc/luasrc/controller/lxc.lua b/applications/luci-app-lxc/luasrc/controller/lxc.lua index 1682def2799e..5b603e52d910 100644 --- a/applications/luci-app-lxc/luasrc/controller/lxc.lua +++ b/applications/luci-app-lxc/luasrc/controller/lxc.lua @@ -140,6 +140,7 @@ function lxc_configuration_set(lxc_name) luci.http.prepare_content("text/plain") local lxc_configuration = luci.http.formvalue("lxc_conf") + lxc_configuration = luci.http.urldecode(lxc_configuration, true) if lxc_configuration == nil then util.perror("lxc error: config formvalue is empty") return diff --git a/applications/luci-app-lxc/luasrc/view/lxc.htm b/applications/luci-app-lxc/luasrc/view/lxc.htm index 69025ad6d392..e5d261c6e8a0 100644 --- a/applications/luci-app-lxc/luasrc/view/lxc.htm +++ b/applications/luci-app-lxc/luasrc/view/lxc.htm @@ -250,7 +250,7 @@

<%:Create New Container%>

var lxc_name = textarea.dataset['id']; var lxc_conf = textarea.value; - new XHR().post('<%=luci.dispatcher.build_url("admin", "services")%>/lxc_configuration_set/' + lxc_name, "lxc_conf=" + encodeURIComponent(lxc_conf), + new XHR().post('<%=luci.dispatcher.build_url("admin", "services")%>/lxc_configuration_set/' + lxc_name, {"lxc_conf": encodeURIComponent(lxc_conf)}, function(x) { if (!x || x.responseText != "0")