[vlc-commits] http: Handle unparsable item name in /requests/playlist_jstree.xml

Mathieu Parent git at videolan.org
Fri Aug 4 09:51:41 CEST 2017


vlc | branch: master | Mathieu Parent <math.parent at gmail.com> | Thu Aug  3 18:27:02 2017 +0200| [7938ffcd3f4be5bb942eeb0612bf627a27bc88c2] | committer: Jean-Baptiste Kempf

http: Handle unparsable item name in /requests/playlist_jstree.xml

Signed-off-by: Mathieu Parent <math.parent at gmail.com>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 share/lua/http/requests/playlist_jstree.xml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/share/lua/http/requests/playlist_jstree.xml b/share/lua/http/requests/playlist_jstree.xml
index bda87d61a1..4281117787 100644
--- a/share/lua/http/requests/playlist_jstree.xml
+++ b/share/lua/http/requests/playlist_jstree.xml
@@ -42,6 +42,7 @@ function print_playlist(item)
     if item.flags.disabled then return end
     if(item.children) then
         local name = vlc.strings.convert_xml_special_chars(item.name or "")
+        name = name or ""
         if(name ~= "Undefined") then
 			print('<item id="plid_' ..tostring(item.id).. '" name="' ..tostring(name).. '" ro="' ..(item.flags.ro and "ro" or "rw").. '"><content><name>' ..name.. '</name></content>')
 			for _, child in ipairs(item.children) do
@@ -55,6 +56,7 @@ function print_playlist(item)
 		end
     else
         local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "")
+        name = name or ""
         local current_item_id = vlc.playlist.current()
         local current = ""
         -- Is the item the one currently played



More information about the vlc-commits mailing list