[vlc-commits] youtube.lua: fix encoded characters in author name (web page)
Pierre Ynard
git at videolan.org
Mon Aug 5 03:26:53 CEST 2013
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Mon Aug 5 03:24:49 2013 +0200| [5c34cc1e696234bf4491e291fddab49160c9bda1] | committer: Pierre Ynard
youtube.lua: fix encoded characters in author name (web page)
Characters with accents are not encoded, but apostrophes happen
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c34cc1e696234bf4491e291fddab49160c9bda1
---
share/lua/playlist/youtube.lua | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 286c6c0..4effd37 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -165,8 +165,13 @@ function parse()
if string.match( line, "<meta property=\"og:image\"" ) then
_,_,arturl = string.find( line, "content=\"(.-)\"" )
end
+ -- This is not available in the video parameters (whereas it
+ -- is given by the get_video_info API as the "author" field)
if not artist then
artist = string.match( line, "yt%-uix%-sessionlink yt%-user%-name[^>]*>([^<]*)</" )
+ if artist then
+ artist = vlc.strings.resolve_xml_special_chars( artist )
+ end
end
-- JSON parameters, also formerly known as "swfConfig",
-- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ...
More information about the vlc-commits
mailing list