mythnettv can't handle apostrephy

Bug #328626 reported by Thomas Mashos
2
Affects Status Importance Assigned to Milestone
MythNetTV
Fix Committed
Undecided
Michael Still

Bug Description

When trying to import a local file with an apostrephy in the description, mythnettv crashes and gives the following error. I tried the description both with quotes and no quotes, failing both times.

Traceback (most recent call last):
  File "/usr/share/mythnettv/mythnettv", line 637, in <module>
    main(sys.argv)
  File "/usr/share/mythnettv/mythnettv", line 386, in main
    prog.FromInteractive(url, title, subtitle, description)
  File "/usr/share/mythnettv/program.py", line 140, in FromInteractive
    self.Store()
  File "/usr/share/mythnettv/program.py", line 200, in Store
    raise e
database.FormatException: Could not format string value description = "Sarah’s obsession with the three dots may pay off, and Weaver introduces Ellison to someone very important." ('ascii' codec can't decode byte 0xe2 in position 6: ordinal not in range(128))

From the forums, this has also been a confirmed problem when subscribing to feeds, indicating that mythnettv can't handle apostrephies at all.

Thomas Mashos (tgm4883)
description: updated
description: updated
Michael Still (mikal)
Changed in mythnettv:
assignee: nobody → mikal-stillhq
status: New → Confirmed
Revision history for this message
Michael Still (mikal) wrote :

This is a problem with single quotes being escaped when handed to the MySQL database. I've added single quote escaping to the FormatSqlValue() method, as well as adding unit tests so this shouldn't regress. The fix was submitted in revision 270.

Changed in mythnettv:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.