In 1.5 I noticed that a manufacturer in my manufacturers drop down box was showing T&S instead of being converted to T&S.
I hunted this down. And it would seem the code at includes/modules/sideboxes/manufacturers.php has changed causing this problem.
At around line 52 in 1.3.9h we have:
Code:
while (!$manufacturer_sidebox->EOF) {
$manufacturer_sidebox_name = ((strlen($manufacturer_sidebox->fields['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturer_sidebox->fields['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturer_sidebox->fields['manufacturers_name']);
In 1.5.1 we have:
Code:
$manufacturer_sidebox_name = zen_output_string(((strlen($manufacturer_sidebox->fields['manufacturers_name']) > (int)MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturer_sidebox->fields['manufacturers_name'], 0, (int)MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturer_sidebox->fields['manufacturers_name']), false, true);
The problem seems to be the zen_output_string and more importantly is the fact this is being sent as PROTECTED=true. This causes htmlspecialchars to be run on the string. Which causes & to turn into &&
Now a simple solution I guess is to change the manufacturer to T&S instead of T&S. That solves the manufacturers drop down.. but causes HTML errors everywhere else my manufacturer name is.
For now I've just made this piece of code not be protected by changing the last true to false. This seems to work right.
Something is inconsistent here though. Either Zen Cart needs to change ampersands or leave them alone.
Bookmarks