Permalink
Browse files

add escape to youtube call (thanks facanferff)

  • Loading branch information...
1 parent 7627a26 commit 2f0ac123372d716501502f443aab519b86b0e7bf @NP- committed Feb 5, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 trailers.js
View
@@ -333,7 +333,7 @@ plugin.addURI( PREFIX + "hdtrailers", function(page) {
if(url.indexOf('youtube.com')==-1){
page.appendItem(url.replace(/amp;amp;/gi,''),"video", metadata);
}else if(url.indexOf('clipconverter.cc')==-1 && service.youtube == "1"){
- page.appendItem('youtube:video:simple:'+ metadata.title + ':' + getValue(url, 'v=', '&')
+ page.appendItem('youtube:video:simple:'+ escape(metadata.title) + ':' + getValue(url, 'v=', '&')
,"video", metadata);
}
url = false;
@@ -410,8 +410,7 @@ plugin.addURI( PREFIX + "hdtrailers:listsources:(.*)", function(page, category)
if( url != '' && url.indexOf('youtube.com')==-1){
page.appendItem(url.replace(/amp;amp;/gi,''), "video", { title: title});
}else if( url != '' && url.indexOf('clipconverter.cc')==-1 && service.youtube == "1"){
- showtime.trace('youtube: ' +url);
- page.appendItem('youtube:video:simple:'+ title + ':' + getValue(url, 'v=', '&')
+ page.appendItem('youtube:video:simple:'+ escape(title) + ':' + getValue(url, 'v=', '&')
,"video", { title: title});
}
url = '';

0 comments on commit 2f0ac12

Please sign in to comment.