factmaven / xml-to-json

Simple API that converts dynamic XML feeds to JSON through a URL or pasting the raw XML data. Made 100% in PHP.
https://api.factmaven.com/xml-to-json
54 stars 24 forks source link

Ampersand (&) not correctly escaped #6

Open jdelaiglesia opened 3 years ago

jdelaiglesia commented 3 years ago

I'm having trouble trying to parse XML from this link:

http://www.managerzone.com/xml/team_league.php?sport_id=1&league_id=16222

Just because of the ampersand, the API considers it as a new parameter so it parses the content of this link instead:

http://www.managerzone.com/xml/team_league.php?sport_id=1

Probably this would help:

https://stackoverflow.com/questions/5020345/how-to-escape-ampersand-character-in-form-input-using-jquery

GitBoudewijn commented 2 years ago

Same as #7.

You're supposed to escape the ampersand yourself: https://api.factmaven.com/xml-to-json/?xml=http://www.managerzone.com/xml/team_league.php?sport_id=1%26league_id=16222