PDA

View Full Version : Bug: & in checkbox name


jasharen
09-28-2007, 09:49 PM
Brian,
The & problem I was running into in regards to altering the select and making it into a multi select is inherent in the code for multiple check box's as well.

I believe the issue revolves around the following lines of code in the construct_custom_fieldbits function:

functions_vba_links_savelink.php

if (!is_array($link[$fieldname]))
{
$link[$fieldname] = htmlspecialchars($link[$fieldname]);
}

This combined with the fact that htmlspecial characters is applied against saved data entry values, but not against the admin panel saved data.

I think this could be fixed by removing the above offending code, and making the save function work the same for admin and data entry (ie either both save as & or both save as &.

Cheers!

jasharen
09-28-2007, 10:01 PM
Tested:

Removed:
if (!is_array($link[$fieldname]))
{
$link[$fieldname] = htmlspecialchars($link[$fieldname]);
}
Changed in checkbox:
$optarray[] = htmlspecialchars($ovalue);
To
$optarray[] = $ovalue;

$option = trim($option);
To
$option = htmlspecialchars(trim($option));


This corrected the problem.

Hope that helps, although I'm sure I went about it the hard way. :)