fix for crashing webserver in 1.9 with unicode program titles

Gary Steele <[email protected]>
Newsgroups gmane.comp.video.freevo.devel
Message-ID <[email protected]>
i experienced this problem recently:

http://www.mail-archive.com/[email protected]/msg18422.html

<http://www.mail-archive.com/[email protected]/msg18422.html>i'm
not sure if it's fixed in an upstream version, but if not, the fix is to
manually throw in unicode conversions using the Unicode() function. For
example, at:

  File "/usr/share/freevo/htdocs/search.rpy", line 123, in _render

the code:

    cell = _('Sorry, the program description for %s is unavailable.') %
('<b>'+prog.title+'</b>')

becomes:

    cell = _('Sorry, the program description for %s is unavailable.') %
('<b>'+prog.title+'</b>')

the same applies at

 File "/usr/lib/python2.5/site-packages/freevo/www/web_types.py", line 355,
in tableCell

where the offending "data" should become Unicode(data):

    self.res += "       <td "+opts+">"+strip_accents(data)+"</td>\n"

this was already manually hacked in tv/programitem.py for the program
titles. there is probably a better way to do this somewhere else in the code
to handle unicode program titles (may already be upstream?)

cheers,
gary

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.