Skip to content

Commit

Permalink
some manifest.xml has non-ascii characters which won't be accepted by…
Browse files Browse the repository at this point in the history
… simplexml_load_string. striping them to make the parser work well.
  • Loading branch information
meathill committed Mar 18, 2015
1 parent 6734b8c commit 63ecb0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ApkParser/XmlParser.php
Expand Up @@ -202,7 +202,9 @@ public function getXmlString()
{
if (!$this->ready)
$this->decompress();
return $this->xml;
$xml = urlencode($this->xml);
$xml = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\x9F]/u', '', $xml);
return $xml;
}

public function getXmlObject($className = '\SimpleXmlElement')
Expand Down

0 comments on commit 63ecb0e

Please sign in to comment.