[vlc-commits] commit: youtube.lua: decode uri/xml-chars on name (Ilkka Ollakka )

git at videolan.org git at videolan.org
Sun Jun 13 22:36:17 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Jun 13 14:38:18 2010 +0300| [0023f19d8acc0909e5fc92a2f7a3ed8f1ea0f9ce] | committer: Ilkka Ollakka 

youtube.lua: decode uri/xml-chars on name

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

 share/lua/playlist/youtube.lua |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 7dafc57..d7b5e7b 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -67,6 +67,7 @@ function parse()
             if not line then break end
             if string.match( line, "<meta name=\"title\"" ) then
                 _,_,name = string.find( line, "content=\"(.-)\"" )
+                name = vlc.strings.resolve_xml_special_chars( name )
             end
             if string.match( line, "<meta name=\"description\"" ) then
                -- Don't ask me why they double encode ...
@@ -151,7 +152,7 @@ function parse()
         return { { path = path; name = name; description = description; artist = artist; arturl = arturl; options = options } }
     else -- This is the flash player's URL
         if string.match( vlc.path, "title=" ) then
-            name = get_url_param( vlc.path, "title" )
+            name = vlc.strings.decode_uri(get_url_param( vlc.path, "title" ))
         end
         video_id = get_url_param( vlc.path, "video_id" )
         arturl = get_arturl( vlc.path, video_id )



More information about the vlc-commits mailing list