[vlc-commits] youtube.lua: fix parsing of empty description field

Pierre Ynard git at videolan.org
Mon Sep 7 20:07:29 CEST 2020


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Sep  7 20:07:02 2020 +0200| [9ddd1b30f16431ce1f8f73eeec018d25a0221050] | committer: Pierre Ynard

youtube.lua: fix parsing of empty description field

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

 share/lua/playlist/youtube.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index e698974513..7b282bd6f1 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -333,6 +333,9 @@ function parse()
                 -- unlikely to access it due to #24957
                 description = string.match( line, '\\"shortDescription\\":\\"(.-[^\\])\\"')
                 if description then
+                    if string.match( description, '^\\"' ) then
+                        description = ""
+                    end
                     -- FIXME: do this properly (see #24958)
                     -- This way of unescaping is technically wrong
                     -- so as little as possible of it should be done



More information about the vlc-commits mailing list