diff --git a/classes.php b/classes.php index 1c2312c..39959c3 100644 --- a/classes.php +++ b/classes.php @@ -68,6 +68,21 @@ class ActionBase64Encode extends AbstractAction } } +class ActionDoubleEntityDecode extends AbstractAction +{ + public function __construct( $value ) + { + parent::__construct( $value ); + $this->setContainer( new TextareaContainer ); + $this->setFormatter( new EchoFormatter ); + } + + public function decode() + { + return html_entity_decode( html_entity_decode( $this->value, ENT_QUOTES, 'UTF-8' ), ENT_QUOTES, 'UTF-8' ); + } +} + class ActionBase64Decode extends AbstractAction { public function __construct( $value ) @@ -145,7 +160,7 @@ class TextareaContainer extends DivContainer { public function wrap( $contents ) { - return parent::wrap( '' ); + return parent::wrap( '' ); } } diff --git a/index.php b/index.php index 402f144..d3cc094 100644 --- a/index.php +++ b/index.php @@ -20,9 +20,10 @@ require_once 'functions.php';