This is crazy. I changed only one line in tpl_header.php and now HTML validation yields no errors at all (on the test site. for simplicity sake let's limit the discussion to the test site only).
Here is what I did. I changed from:
PHP Code:
<?php echo '<a href="index.php?main_page=index&cPath=2">' . zen_image($template->get_template_dir(HEADER_CATEGORIES_TABS1, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' .
HEADER_CATEGORIES_TABS1, HEADER_CATEGORIES_TABS1_ALT) . '</a>'; ?>
To:
PHP Code:
<?php echo '<a href="index.php?main_page=index' . htmlspecialchars('&') . 'cPath=2">' . zen_image($template->get_template_dir(HEADER_CATEGORIES_TABS1, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' .
HEADER_CATEGORIES_TABS1, HEADER_CATEGORIES_TABS1_ALT) . '</a>'; ?>
I left the two other (faulty?) lines as they are.
Any explanation for this?
Why does htmlspecialchars('&') work whereas '&' doesn't?
Bookmarks