diff options
author | Steven Barth <steven@midlink.org> | 2008-07-31 09:54:09 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-07-31 09:54:09 +0000 |
commit | 14e62cc311ddbe9d215f51b910164f2e4a95fd20 (patch) | |
tree | 6cb980ce27380c8cd4f53bf690383ffc16fb1d5d | |
parent | aa462baa33bf0c85448e9d7779d81ab70827b56f (diff) |
libs/web: Fixed template escaping
-rw-r--r-- | libs/web/luasrc/template.lua | 14 | ||||
-rw-r--r-- | modules/admin-mini/luasrc/view/mini/reboot.htm | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libs/web/luasrc/template.lua b/libs/web/luasrc/template.lua index 17e1daad70..659c7216d8 100644 --- a/libs/web/luasrc/template.lua +++ b/libs/web/luasrc/template.lua @@ -80,17 +80,17 @@ function compile(template) template = sanitize(template) -- Template module header/footer declaration - local header = "write('" - local footer = "')" + local header = 'write("' + local footer = '")' template = header .. template .. footer -- Replacements - local r_include = "')\ninclude('%s')\nwrite('" - local r_i18n = "'..translate('%1','%2')..'" - local r_i18n2 = "'..translate('%1', '')..'" - local r_pexec = "'..(%s or '')..'" - local r_exec = "')\n%s\nwrite('" + local r_include = '")\ninclude("%s")\nwrite("' + local r_i18n = '"..translate("%1","%2").."' + local r_i18n2 = '"..translate("%1", "").."' + local r_pexec = '"..(%s or "").."' + local r_exec = '")\n%s\nwrite("' -- Parse the expressions for k,v in pairs(expr) do diff --git a/modules/admin-mini/luasrc/view/mini/reboot.htm b/modules/admin-mini/luasrc/view/mini/reboot.htm index b0f64698d5..6ef8603f06 100644 --- a/modules/admin-mini/luasrc/view/mini/reboot.htm +++ b/modules/admin-mini/luasrc/view/mini/reboot.htm @@ -28,6 +28,6 @@ if not reboot then <p><a href="<%=REQUEST_URI%>?reboot=1"><%:a_s_reboot_do%></a></p> <%- else -%> <p><%:a_s_reboot_running%></p> -<script type="text/javascript">setTimeout("location='<%=controller%>/admin'", 60000)</script> +<script type="text/javascript">setTimeout("location='<%=controller%>'", 60000)</script> <%- end -%> <%+footer%>
\ No newline at end of file |