Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current version of the Twilio PHP library will take input passed in and run it through the PHP `htmlentities` function. This produces "named" character entities in the output. Named character entities and XML don't get along. Only the 'quot', 'amp', 'apos', 'lt', and 'gt' entities are defined. This change replaces the `htmlentities` call with an process that decodes the input and then runs it through `htmlspecialchars` to produce "numeric" entities instead. This should accommodate most western character sets. Non standard (to php's default htmlspecialchars) multi-byte character sets will fail silently in Twilio (ie: say nothing) instead of throwing an application error.
- Loading branch information
Showing
3 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters