Zen Cart Logo
Forums / General Questions / external Javascript ampersands conflicting with W3C requirements

external Javascript ampersands conflicting with W3C requirements

Views: 666

Results 1 to 4 of 4
11 Apr 2013, 4:21 PM
#1
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

external Javascript ampersands conflicting with W3C requirements

I am using a javascript call to retrieve link info from a music playlist. It sends the user to the proper page to buy each particular track. The problem is the ampersands in the URL If left unencoded, w3c logs an error for each - 300 errors on one page. If I encode them as & or as %26 or as &amp (suggestions from the w3c site) ZenCart opens on a blank page, even though the URL appears correct. How can I get this to both work AND be 23c compliant?

Sorry, I can't upgrade to v151, Bluehost is responsible for the version upgrades, and their v5 is not installing at the moment. But this should not affect the URL issue. I'm working with BH to get updated, meanwhile any help would be appreciated.

If you wish to see this in action, look at http://www.thesoundsmith.com/radiopg.htm for a working version and http://www.thesoundsmith.com/radiopg2.htm for a broken one.

11 Apr 2013, 4:44 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: external Javascript ampersands conflicting with W3C requirements

Those pages do not appear to be ZenCart pages

11 Apr 2013, 5:05 PM
#3
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

Re: external Javascript ampersands conflicting with W3C requirements

kobra:

Those pages do not appear to be ZenCart pages No, those are the pages that link to the ZenCart. The "radiopg2" is the one that generates the errors to ZenCart but keep W3C happy. 90% of the audio files have links to ZenCart, the rest are not for sale. If you go to the radio page and click on the "Buy" button, it links to the cart. If you do it on radiopg2, it links to the empty page carat rather than the page with items for sale.

11 Apr 2013, 5:16 PM
#4
thesoundsmith avatar

thesoundsmith

New Zenner

Join Date:
Jun 2008
Location:
Monterey, CA
Posts:
36
Plugin Contributions:
0

Re: external Javascript ampersands conflicting with W3C requirements

Never mind! The problem was fixed by converting the calling page's DOCTYPE to HTML5.

Thanks for the support.