Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where is the code that adds the osCsid to URLs in product descriptions?


ToddSlaughter

Recommended Posts

Posted

I'm trying to make my site (www.FlyHurricane.com) validate using the W3C validator, and I'm mostly there. One reason osCommerce won't validate is that it doesn't use encoded ampersands in URLs. I've already modified tep_redirect() and tep_href_link() and tep_image() and tep_image_submit(), and those took care of nearly everything. But I'm missing something else.

 

If I put a link into my homepage or a product description, something adds the session ID. I set up a very simple test case and walked the code and I think the following is happening:

  1. The page output gets buffered
  2. When the buffer flushes, something modifies all the URLs

Is that what's happening? And if so, where?! I can't find the function that modifies the URLs. I need the urls to use & instead of &. This is for URLs that are explicitly written within a block of text. They are not produced with the help of any of the tep functions.

 

Thanks!

Posted

yes, its in your catalog\includes\functions\html_output.php function tep_href_link before you return the link you do

 

$link = str_replace('&', '&', $link);

or

return htmlspecialchars(utf8_encode($link));

 

and in general for all html strings those php functions set.

 

however it will likely break links that are expecting encoded urls and those files have to be modified accordingly or the tep_href_link function needs to be extended for it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...