you may need to write two functions for this
function1 {
// convert the special characters into their HTML special values (i think its ISO 8660 or something like that). consult the HTML ascii values table. (run a search on yahoo)
}
and then when that value is passed
function2 {
// reconverts the converted HTML values into their original values
}
I think there is an easier way to do this but this is a workaround if there is nothing else.
use htmlspecialchars() and str_replace() to replace these special characters
another thing is to set up your own conversion such that
all & (ampersands) are converted into & ; or something to that effect
hope that helps