Does anyone know if php by automatically does htmlentities() on soap objects?
I got the following function that creates a soap object:
function insertNote(){
$soap = new SoapClient ("http://you.com/note.asmx?WSDL",
array ('exceptions' => 0,
'encoding' => 'UTF-8',
'trace' => 1));
$result = $soap->insertNote (array ('id' => $in['id'],
'noteText' => $in['noteText']));
}
The $in variable contains:
Array
(
[id] => 21
[noteText] => Me & you
)
But the in the soap-object the '&' has been replaced with '&':
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://me.com/">
<SOAP-ENV:Body>
<ns1:InsertNote noteText="Me & you"/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Does anyone know why?