twiml: Fix escaping issues with "innerxml" tag

Merged
#2 · Created  · Last updated

Merged pull request

Merged in pmoney/twilio/xml-escaping-fix (pull request #2)

b484959·Author: ·Closed by: ·2016-01-28

Description

The ,innerxml struct tag assumed raw XML, which means that entities such as ampersand are not escaped correctly. For example:

twiml.Say{Text: "PB & J"}

...would currently generate broken XML:

<Say>PB & J</Say>

Changing the struct tag to ,chardata fixes this issue.

<Say>PB &amp; J</Say>

0 attachments

0 comments

Loading commits...