Author: duncan
Date: Tue Nov 20 15:44:41 2007
New Revision: 10150

Log:
[ 1835322 ] Rel-1 svn webserver - bug with & in filenames
Fix applied, always need to use urllib.quote


Modified:
   branches/rel-1-7/freevo/ChangeLog
   branches/rel-1-7/freevo/src/www/htdocs/library.rpy
   branches/rel-1/freevo/ChangeLog
   branches/rel-1/freevo/src/www/htdocs/library.rpy

Modified: branches/rel-1-7/freevo/ChangeLog
==============================================================================
--- branches/rel-1-7/freevo/ChangeLog   (original)
+++ branches/rel-1-7/freevo/ChangeLog   Tue Nov 20 15:44:41 2007
@@ -25,6 +25,7 @@
  * Fixed itv plug-in, having "No player for this item found" 
(B#1833018,B#1833829)
  * Fixed lastfm plug-in path using /tmp to use FREEVO_CACHEDIR (B#1834488)
  * Fixed oneclick weather plug-in not handling bad icon data (B#1834275)
+ * Fixed webserver media library opening images with a '&' in the name 
(B#1835322)
 
 == Release 1.7.4 (2007-11-15) ==
 --------------------------------

Modified: branches/rel-1-7/freevo/src/www/htdocs/library.rpy
==============================================================================
--- branches/rel-1-7/freevo/src/www/htdocs/library.rpy  (original)
+++ branches/rel-1-7/freevo/src/www/htdocs/library.rpy  Tue Nov 20 15:44:41 2007
@@ -486,8 +486,11 @@
                             size = (info['width'], info['height'])
                         image_link = self.convert_dir(filepath)
                         scaled_image_link = self.convert_dir(scaled_image_path)
-                        fv.tableCell('<div class="image"><a 
href="javascript:openfoto(\''+image_link+'\','+str(size[0])+','+str(size[1])+')">'\
-                            +'<img src="'+scaled_image_link+'" /><br 
/>'+Unicode(title)+'</a></div>', 'class="'+status+'" colspan="1"')
+                        fv.tableCell('<div class="image"><a 
href="javascript:openfoto(\''+\
+                            urllib.quote(image_link)+\
+                            '\','+str(size[0])+','+str(size[1])+')">'+
+                            '<img src="'+scaled_image_link+'" /><br 
/>'+Unicode(title)+'</a></div>', \
+                            'class="'+status+'" colspan="1"')
                     ### show movie
                     elif action_mediatype == "movies":
                         if os.path.exists(jpg_file):
@@ -496,7 +499,8 @@
                             image_info = metadata.parse(image)
                             size = (image_info['width'], image_info['height'])
                             new_size = self.resize_image(image_link, size)
-                            image = '<img src="'+image_link+'" 
height="'+str(new_size[1])+'px" width="'+str(new_size[0])+'px" /><br />'
+                            image = '<img src="'+image_link+'" 
height="'+str(new_size[1])+'px" width="'+\
+                                str(new_size[0])+'px" /><br />'
                         else:
                             image = '<img src="images/library/movies.png" 
height="200px" width="200px" /><br />'
                         fv.tableCell('<a onclick="info_click(this, event)" 
id="'+filepath+'">'\

Modified: branches/rel-1/freevo/ChangeLog
==============================================================================
--- branches/rel-1/freevo/ChangeLog     (original)
+++ branches/rel-1/freevo/ChangeLog     Tue Nov 20 15:44:41 2007
@@ -30,6 +30,7 @@
  * Fixed itv plug-in, having "No player for this item found" 
(B#1833018,B#1833829)
  * Fixed lastfm plug-in path using /tmp to use FREEVO_CACHEDIR (B#1834488)
  * Fixed oneclick weather plug-in not handling bad icon data (B#1834275)
+ * Fixed webserver media library opening images with a '&' in the name 
(B#1835322)
 
 == Release 1.7.4 (2007-11-15) ==
 --------------------------------

Modified: branches/rel-1/freevo/src/www/htdocs/library.rpy
==============================================================================
--- branches/rel-1/freevo/src/www/htdocs/library.rpy    (original)
+++ branches/rel-1/freevo/src/www/htdocs/library.rpy    Tue Nov 20 15:44:41 2007
@@ -486,8 +486,11 @@
                             size = (info['width'], info['height'])
                         image_link = self.convert_dir(filepath)
                         scaled_image_link = self.convert_dir(scaled_image_path)
-                        fv.tableCell('<div class="image"><a 
href="javascript:openfoto(\''+image_link+'\','+str(size[0])+','+str(size[1])+')">'\
-                            +'<img src="'+scaled_image_link+'" /><br 
/>'+Unicode(title)+'</a></div>', 'class="'+status+'" colspan="1"')
+                        fv.tableCell('<div class="image"><a 
href="javascript:openfoto(\''+\
+                            urllib.quote(image_link)+\
+                            '\','+str(size[0])+','+str(size[1])+')">'+
+                            '<img src="'+scaled_image_link+'" /><br 
/>'+Unicode(title)+'</a></div>', \
+                            'class="'+status+'" colspan="1"')
                     ### show movie
                     elif action_mediatype == "movies":
                         if os.path.exists(jpg_file):
@@ -496,7 +499,8 @@
                             image_info = metadata.parse(image)
                             size = (image_info['width'], image_info['height'])
                             new_size = self.resize_image(image_link, size)
-                            image = '<img src="'+image_link+'" 
height="'+str(new_size[1])+'px" width="'+str(new_size[0])+'px" /><br />'
+                            image = '<img src="'+image_link+'" 
height="'+str(new_size[1])+'px" width="'+\
+                                str(new_size[0])+'px" /><br />'
                         else:
                             image = '<img src="images/library/movies.png" 
height="200px" width="200px" /><br />'
                         fv.tableCell('<a onclick="info_click(this, event)" 
id="'+filepath+'">'\

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to