diff --git a/CHANGELOG.md b/CHANGELOG.md index 18dbef3..100de6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 1.0.0 - 2018-12-23 + +### Changes + +- response will always be a result-array (_breaking_) + +### Added + +- `verify_peer_name` option (thx @panaceya) + +### Fixed + +- cz-nic (thx @krtcom) +- php 7.2+ compat (thx @krtcom) + ## 0.3.1 - 2017-04-27 ### Added diff --git a/src/AfriCC/EPP/AbstractFrame.php b/src/AfriCC/EPP/AbstractFrame.php index 63ddfbd..716d5c0 100755 --- a/src/AfriCC/EPP/AbstractFrame.php +++ b/src/AfriCC/EPP/AbstractFrame.php @@ -59,7 +59,7 @@ public function set($path = null, $value = null) } if ($value !== null) { - $this->nodes[$path]->nodeValue = $value; + $this->nodes[$path]->nodeValue = htmlspecialchars($value, ENT_XML1, 'UTF-8'); } return $this->nodes[$path]; diff --git a/tests/EPP/Frame/Command/Create/ContactCreateTest.php b/tests/EPP/Frame/Command/Create/ContactCreateTest.php index 2be5670..a6b02f1 100644 --- a/tests/EPP/Frame/Command/Create/ContactCreateTest.php +++ b/tests/EPP/Frame/Command/Create/ContactCreateTest.php @@ -254,4 +254,32 @@ public function testContactCreateDiscloseFrame() (string) $frame ); } + + public function testContactCreateEntities() + { + $frame = new Contact(); + $frame->setId('CONTACT1'); + $frame->setOrganization('Fäther & Sons"'); + + $this->assertXmlStringEqualsXmlString( + ' + + + + + CONTACT1 + + Fäther & Sons" + + + Father & Sons" + + + + + + ', + (string) $frame + ); + } } diff --git a/tests/EPP/Frame/Command/Update/HostUpdateTest.php b/tests/EPP/Frame/Command/Update/HostUpdateTest.php new file mode 100644 index 0000000..a18efa8 --- /dev/null +++ b/tests/EPP/Frame/Command/Update/HostUpdateTest.php @@ -0,0 +1,48 @@ +setHost('ns1.example.com'); + $frame->addAddr('1.1.1.1'); + $frame->removeAddr('8.8.8.8'); + $frame->addAddr('1080:0:0:0:8:800:200C:417A'); + $frame->addStatus('clientUpdateProhibited'); + $frame->removeStatus('clientTransferProhibited'); + $frame->changeHost('ns2.example.com'); + + $this->assertXmlStringEqualsXmlString( + ' + + + + + ns1.example.com + + 1.1.1.1 + 1080:0:0:0:8:800:200C:417A + + + + 8.8.8.8 + + + + ns2.example.com + + + + + + ', + (string) $frame + ); + } +}