[mythtv-users] Mythweb - minor bug; not escaping channel names.

Ciaran ciaranj at gmail.com
Mon Jan 10 03:13:22 EST 2005


Hi,
I (think) I'm on the latest CVS version of mythweb. One of my Channels
is defined as "UK Br'tIdeas".  This particular channel breaks the
javascript of mythweb, so the popup hovers fail to work under firefox
and error in IE.  (At least for me!).

The reason is (quite obviously) because the apostrophe in the channel
name is not escaped correctly so it breaks the string definition in
the onmouseover declaration, i.e. I get :
  onmouseover="window.status='Details for: 19 UKTV Br'tIdeas';return true"
rather than the (correct?) 
  onmouseover="window.status='Details for: 19 UKTV Br\'tIdeas';return true"

[incidentally shoudl there not be a trailing ';' after the return true? 

Does PHP have a HTMLEncode type equivalent to ASP ? as all strings
used in this fashion should be safely encoded (imho) .... I'd submit a
patch to whoever is currently developing MythWeb, but unfortunately
i'm at work atm and haven't got access to my source box. Sryt.


Thanks,
-- 
- Ciaran


More information about the mythtv-users mailing list