Page 1 of 1

Ampersand Bug in WAP

PostPosted: Fri Jan 26, 2007 4:38 am
by kapz
For a few weeks I have had this problem using the Subsonic WAP interface on my Treo 700p. Only when certain letters are selected from the main WAP screen would I receive an error “WML content contains invalid syntax”. There were no errors in the Apache Logs, Subsonic Logs or Windows Event Viewer. I uninstalled Apache, deleted all Subsonic folders and updated J2RE runtime to version 1.50.10. Installed Apache Tomcat version 5.5.20 and Subsonic v2.9 (I was using 2.9b1) and still had an issue.

I think I have found the problem. The letters (from the main WAP page) which caused the error contained a folder with an ampersand. I can view song titles, but folders with an ampersand prevented the page from viewing. Can this be fixed?

Thanks for a great product

The same bug happens on a RAZR browser too. Can you URL encode the ampersans?

PostPosted: Mon Jan 29, 2007 12:25 pm
by sindre_mehus
Yep, you're absolutely right. Will be fixed in Subsonic 3.0. Thank you for reporting it!

If you want to patch it immediately you can do so. Locate the file "c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\subsonic\WEB-INF\jsp\wap\index.jsp", and change this line:
Code: Select all
<a href="${url}">${artist.title}</a><br/>

to
Code: Select all
<a href="${url}">${fn:escapeXml(artist.title)}</a><br/>


Sindre

PostPosted: Tue Jan 30, 2007 4:56 am
by kapz
Thank you sindre, that fixed the problem.