[vlc-commits] lua-http: XML encode metadata before pushing it on the page (closes #15866 )

Felix Paul Kühne git at videolan.org
Tue Nov 24 16:54:03 CET 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Nov 24 16:48:37 2015 +0100| [a6b0ddeab8a3c8420b584d086fcae4b96bb85abe] | committer: Felix Paul Kühne

lua-http: XML encode metadata before pushing it on the page (closes #15866)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6b0ddeab8a3c8420b584d086fcae4b96bb85abe
---

 share/lua/http/requests/status.xml |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/share/lua/http/requests/status.xml b/share/lua/http/requests/status.xml
index ef400ed..d3e468d 100644
--- a/share/lua/http/requests/status.xml
+++ b/share/lua/http/requests/status.xml
@@ -49,7 +49,8 @@ local item = vlc.input.item()
       if item then
         local metas = item:metas()
         for k,v in pairs(metas) do
-          print("<info name='"..httprequests.xmlString(k).."'>"..httprequests.xmlString(v).."</info>")
+          local metadataContent = vlc.strings.convert_xml_special_chars( httprequests.xmlString(v) )
+          print("<info name='"..httprequests.xmlString(k).."'>"..metadataContent.."</info>")
         end
       end
     ?>



More information about the vlc-commits mailing list