You are here:  » Allowing for special characters

Allowing for special characters

Submitted by msimonds on Thu, 2010-07-01 13:24 in


Came across another issue and cannot fined a fix using Magic parser. I was hoping that you would be able to help me out

I am implementing a single sign on from an outside application, This sends a web service call to my server, through our DMZ to active directory and responds with a true/false.

Problem is that some users could have special characters in their passwords and it seems that magic parser strips those out. Here is an example

SOAP XML coming in from Service

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
  <Authenticate xmlns="">

As you see there are ampersands in the SOAP XML, but it seems they are stripped out.

Here is a print_r after it is processed by your scripts:

Since these passwords are hitting AD, I need to be able to pass them.
What can I do to correct this?

Submitted by support on Thu, 2010-07-01 13:37

Hello Mike,

&amp; is the correct encoding for the ampersand symbol, and ordinarily Magic Parser / PHP will handle them correctly.

However, there is a version of the underlying XML library used by PHP (and subsequently Magic Parser) that contains a bug that strips entities from the output rather than decoding them!

I have a version of MagicParser.php that contains a work-around for this bug which I will email to you now...

All the best,