There is one new element in the json data served by Instagram named
"404_as_react", and this makes the conversion from json to XML fail
because names starting with a number are illegal in XML.
Fix the problem by prepending an underscore to the problematic name.
- return Tweeper::jsonToXml($matches[1], 'instagram');
+ // Filter elements which will result in invalid XML element names.
+ $json = str_replace('404_as_react', '_404_as_react', $matches[1]);
+
+ return Tweeper::jsonToXml($json, 'instagram');