diff -Naur ./mythtv-new/libs/libmythupnp/httprequest.cpp ./mythtv/libs/libmythupnp/httprequest.cpp
--- ./mythtv-new/libs/libmythupnp/httprequest.cpp       2008-06-07 19:19:04.000000000 -0400
+++ ./mythtv/libs/libmythupnp/httprequest.cpp   2008-06-07 19:26:12.000000000 -0400
@@ -1127,7 +1127,7 @@
 QString &HTTPRequest::Encode( QString &sStr )
 {
     //VERBOSE(VB_UPNP, QString("HTTPRequest::Encode Input : %1").arg(sStr));
-    sStr.replace(QRegExp( "&"), "&amp;" ); // This _must_ come first
+    sStr.replace(QRegExp( "&(?!(amp|lt|gt|quot|apos);)"), "&amp;" ); // This _must_ come first
     sStr.replace(QRegExp( "<"), "&lt;"  );
     sStr.replace(QRegExp( ">"), "&gt;"  );
     sStr.replace(QRegExp("\""), "&quot;");
diff -Naur ./mythtv-new/libs/libmythupnp/upnpcds.cpp ./mythtv/libs/libmythupnp/upnpcds.cpp
--- ./mythtv-new/libs/libmythupnp/upnpcds.cpp   2008-06-07 19:19:04.000000000 -0400
+++ ./mythtv/libs/libmythupnp/upnpcds.cpp       2008-06-07 19:07:34.000000000 -0400
@@ -864,7 +864,7 @@

             QStringMap  mapParams;
             QString     sParams = idPath.last().section( '?', 1, 1 );
-            sParams.replace(QRegExp( "&amp;"), "&" );
+            sParams.replace(QRegExp( "&(?!(amp|lt|gt|quot|apos);)"), "&amp;" );

             HTTPRequest::GetParameters( sParams, mapParams );

