diff --git a/src/Voice/Bxml/Bridge.php b/src/Voice/Bxml/Bridge.php index 6108d4e..c4c071f 100644 --- a/src/Voice/Bxml/Bridge.php +++ b/src/Voice/Bxml/Bridge.php @@ -140,7 +140,9 @@ public function fallbackPassword($fallbackPassword) { } public function toBxml($doc) { - $element = $doc->createElement("Bridge", $this->targetCall); + $element = $doc->createElement("Bridge"); + + $element->appendChild($doc->createTextNode($this->targetCall)); if(isset($this->bridgeCompleteUrl)) { $element->setAttribute("bridgeCompleteUrl", $this->bridgeCompleteUrl); diff --git a/src/Voice/Bxml/Conference.php b/src/Voice/Bxml/Conference.php index b583558..3dae673 100644 --- a/src/Voice/Bxml/Conference.php +++ b/src/Voice/Bxml/Conference.php @@ -140,7 +140,9 @@ public function fallbackPassword($fallbackPassword) { } public function toBxml($doc) { - $element = $doc->createElement("Conference", $this->conferenceName); + $element = $doc->createElement("Conference"); + + $element->appendChild($doc->createTextNode($this->conferenceName)); if(isset($this->username)) { $element->setattribute("username", $this->username); diff --git a/src/Voice/Bxml/PhoneNumber.php b/src/Voice/Bxml/PhoneNumber.php index e681551..e41a902 100644 --- a/src/Voice/Bxml/PhoneNumber.php +++ b/src/Voice/Bxml/PhoneNumber.php @@ -122,7 +122,9 @@ public function fallbackPassword($fallbackPassword) { } public function toBxml($doc) { - $element = $doc->createElement("PhoneNumber", $this->phoneNumber); + $element = $doc->createElement("PhoneNumber"); + + $element->appendChild($doc->createTextNode($this->phoneNumber)); if(isset($this->username)) { $element->setAttribute("username", $this->username); diff --git a/src/Voice/Bxml/PlayAudio.php b/src/Voice/Bxml/PlayAudio.php index 017b76d..a642516 100644 --- a/src/Voice/Bxml/PlayAudio.php +++ b/src/Voice/Bxml/PlayAudio.php @@ -41,7 +41,9 @@ public function password($password) { } public function toBxml($doc) { - $element = $doc->createElement("PlayAudio", $this->url); + $element = $doc->createElement("PlayAudio"); + + $element->appendChild($doc->createTextNode($this->url)); if(isset($this->username)) { $element->setAttribute("username", $this->username); diff --git a/src/Voice/Bxml/Response.php b/src/Voice/Bxml/Response.php index 35ede23..ed24d75 100644 --- a/src/Voice/Bxml/Response.php +++ b/src/Voice/Bxml/Response.php @@ -26,11 +26,6 @@ public function __construct() { * @param Verb $verb The verb to add to the list */ public function addVerb($verb) { - foreach($verb as $key => $value) { // encodes any verb attributes of type string to avoid php character encoding bug - if(gettype($value) == "string") { - $verb->$key = htmlspecialchars($value, ENT_XML1, 'UTF-8'); - } - } array_push($this->verbs, $verb); } diff --git a/src/Voice/Bxml/SendDtmf.php b/src/Voice/Bxml/SendDtmf.php index 4d42a95..819fcee 100644 --- a/src/Voice/Bxml/SendDtmf.php +++ b/src/Voice/Bxml/SendDtmf.php @@ -41,7 +41,9 @@ public function toneInterval($toneInterval) { } public function toBxml($doc) { - $element = $doc->createElement("SendDtmf", $this->digits); + $element = $doc->createElement("SendDtmf"); + + $element->appendChild($doc->createTextNode($this->digits)); if(isset($this->toneDuration)) { $element->setattribute("toneDuration", $this->toneDuration); diff --git a/src/Voice/Bxml/SipUri.php b/src/Voice/Bxml/SipUri.php index 1a6a3dd..f3f9f3b 100644 --- a/src/Voice/Bxml/SipUri.php +++ b/src/Voice/Bxml/SipUri.php @@ -131,7 +131,9 @@ public function fallbackPassword($fallbackPassword) { } public function toBxml($doc) { - $element = $doc->createElement("SipUri", $this->sip); + $element = $doc->createElement("SipUri"); + + $element->appendChild($doc->createTextNode($this->sip)); if(isset($this->username)) { $element->setAttribute("username", $this->username); diff --git a/src/Voice/Bxml/SpeakSentence.php b/src/Voice/Bxml/SpeakSentence.php index 77155ed..68e3dcb 100644 --- a/src/Voice/Bxml/SpeakSentence.php +++ b/src/Voice/Bxml/SpeakSentence.php @@ -50,7 +50,9 @@ public function gender($gender) { } public function toBxml($doc) { - $element = $doc->createElement("SpeakSentence", $this->sentence); + $element = $doc->createElement("SpeakSentence"); + + $element->appendChild($doc->createTextNode($this->sentence)); if(isset($this->locale)) { $element->setAttribute("locale", $this->locale); diff --git a/src/Voice/Bxml/Tag.php b/src/Voice/Bxml/Tag.php index bc1343f..f72e4d7 100644 --- a/src/Voice/Bxml/Tag.php +++ b/src/Voice/Bxml/Tag.php @@ -23,7 +23,9 @@ public function __construct($tag) { } public function toBxml($doc) { - $element = $doc->createElement("Tag", $this->tag); + $element = $doc->createElement("Tag"); + + $element->appendChild($doc->createTextNode($this->tag)); return $element; }