[mythtv-commits] Ticket #5434: nuvexport cannot handle '&'

MythTV mythtv at cvs.mythtv.org
Fri Jun 13 16:07:54 UTC 2008

#5434: nuvexport cannot handle '&'
 Reporter:  tobias at tobias-mueller.eu  |       Owner:  xris  
     Type:  defect                    |      Status:  new   
 Priority:  minor                     |   Milestone:  0.21.1
Component:  perl / nuvexport          |     Version:  0.21  
 Severity:  medium                    |     Mlocked:  0     
 If the db-password contains an "&", mythtv will save it as an "&" in
 the config-file. So if nuvexport reads this file with the regular
 expression (and not via an xml-parser), it will not recognize this.

 The solution which worked for me was to replace the &. In line 278 of
 the MythTV.pm (I am using Ubuntu and in my case it's in /usr/share/perl5/)
 you can find this code:

 elsif ($line =~ m#<DBPassword>(.*?)</DBPassword>#) {
    $mysql_conf{'db_pass'}  = $1;

 I replaced this code with:

 elsif ($line =~ m#<DBPassword>(.*?)</DBPassword>#) {
   my $pwdtmp = $1;
   my $find = "&amp;";
   my $replace = "&";
   $pwdtmp =~ s/$find/$replace/g;
   $mysql_conf{'db_pass'}  = $pwdtmp;

 Chris Peterson wrote me the following about the bug:

 [...] This is actually more about the perl bindings (which nuvexport uses)
 not unescaping entities in the XML code.  Easy fix [...]

 If I can help anyhow, please let me know.


Ticket URL: <http://svn.mythtv.org/trac/ticket/5434>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list