applications/luci-livestats: properly escape essids (closes OpenWrt ticket #4888)
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 9 Apr 2009 14:09:39 +0000 (14:09 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 9 Apr 2009 14:09:39 +0000 (14:09 +0000)
applications/luci-livestats/luasrc/view/livestats/wireless.htm

index 670d9fb..ca384b2 100644 (file)
@@ -26,8 +26,8 @@
                          padding: { left: 40, right: 10, top: 10, bottom: 20 },
                          instanceNames: {
                                <%- for k,v in pairs(luci.sys.wifi.getiwconfig()) do %>
                          padding: { left: 40, right: 10, top: 10, bottom: 20 },
                          instanceNames: {
                                <%- for k,v in pairs(luci.sys.wifi.getiwconfig()) do %>
-                                       <%-="%q:%q," % {k, "%s (%s)" % {k, tostring(v.ESSID)}}-%>
-                               <% end %>  
+                                       <%-="%q:%q," % {k, "%s (%s)" % {k, luci.util.pcdata(tostring(v.ESSID))}}-%>
+                               <% end %>
                                "0": ""
                          }},
                        null,
                                "0": ""
                          }},
                        null,