Ampersand Bug in WAP

Need help? Post your questions here.

Moderator: moderators

Ampersand Bug in WAP

Postby kapz » Fri Jan 26, 2007 4:38 am

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?
User avatar
kapz
 
Posts: 124
Joined: Wed Jun 21, 2006 7:23 pm

Postby sindre_mehus » Mon Jan 29, 2007 12:25 pm

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
User avatar
sindre_mehus
 
Posts: 1955
Joined: Tue Nov 29, 2005 6:19 pm
Location: Oslo, Norway

Postby kapz » Tue Jan 30, 2007 4:56 am

Thank you sindre, that fixed the problem.
User avatar
kapz
 
Posts: 124
Joined: Wed Jun 21, 2006 7:23 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 24 guests