Skip to content

Commit

Permalink
Fix xml preg replace (#519)
Browse files Browse the repository at this point in the history
* fix bug for xml preg_replace

* fix bug for #515
  • Loading branch information
springjk authored and overtrue committed Oct 19, 2016
1 parent 0c79b37 commit 313b193
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Core/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function parseJSON($body)
*/
protected function fuckTheWeChatInvalidJSON($invalidJSON)
{
return preg_replace("/\p{Cc}/u", '', trim($invalidJSON));
return preg_replace('/[\x00-\x1F\x80-\x9F]/u', '', trim($invalidJSON));
}

/**
Expand Down

0 comments on commit 313b193

Please sign in to comment.