Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HTML Validator


ghari

Recommended Posts

Posted

Hai friends

 

Anybody knows how to make oscommerce site fully HTML Validate.

 

The & in the querystring is not validating. We can use html "&" instead of this.

 

Is there any shortcut for doing this?

 

 

Thanks :D

  • 2 weeks later...
Posted
Hai friends

 

      Anybody knows how to make oscommerce site fully HTML Validate.

 

      The & in the querystring is not validating. We can use html  "&" instead of this.

 

      Is there any shortcut for doing this?

 

 

      Thanks :D

 

Back up exisiting files first

 

1: "includes/functions/html_output.php"

-before (line 69-70):

code:

return $link;

}

 

-insert (line 68):

code:

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

 

If doing the str_replace with the &'s in tep_href_link, you will not be able to add any products to the cart with cookies disabled.

This is because of the tep_redirect and '&' not working on a header redirect. Here is the fix:

 

 

2: "includes/functions/general.php"

- near the top find:

Code:

function tep_redirect($url) {

 

- replace with (change is addition of one line):

Code:

function tep_redirect($url) {

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

 

 

3: "/includes/functions/html_output.php"

- change (line 121):

code:

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

 

- to:

code:

$image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" alt="' . tep_output_string($alt) . '"';

 

(border="0" is deleted from this line)

 

4: removed one <tr> from "includes/modules/upcoming_products" (file included)

Posted

Hi,

 

I am also interested in validating my code, but before I do some changes as suggested above I would like to know what this means?

 

Sorry, I am unable to validate this document because on line 450, 479, 512-514, 539, 542, 570, 610-612, 615-617, 661, 690, 693, 696, 699, 702, 705, 708, 764  it contained one or more bytes that I cannot interpret as utf-8  (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.

 

Mark

Lifes a bitch, then you marry one, then you die!

Archived

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

×
×
  • Create New...