Add quoted_printable_encode()

This commit is contained in:
Adam Backstrom 2012-09-17 14:18:32 -04:00
parent a58513cb59
commit d9126e1105
2 changed files with 16 additions and 0 deletions

View File

@ -53,6 +53,21 @@ class ActionQuotedPrintableDecode extends AbstractAction
}
}
class ActionQuotedPrintableEncode extends AbstractAction
{
public function __construct( $value )
{
parent::__construct( $value );
$this->setContainer( new TextareaContainer );
$this->setFormatter( new EchoFormatter );
}
public function decode()
{
return quoted_printable_encode( $this->value );
}
}
class ActionBase64Encode extends AbstractAction
{
public function __construct( $value )

View File

@ -36,6 +36,7 @@ if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
<select name="action">
<option value="DoubleEntityDecode" <?php echo selected($action_str, 'DoubleEntityDecode'); ?>>html_entity_decode(html_entity_decode())</option>
<option value="QuotedPrintableDecode" <?php echo selected($action_str, 'QuotedPrintableDecode'); ?>>quoted_printable_decode()</option>
<option value="QuotedPrintableEncode" <?php echo selected($action_str, 'QuotedPrintableEncode'); ?>>quoted_printable_encode()</option>
<option value="Urlencode" <?php echo selected($action_str, 'Urlencode'); ?>>urlencode()</option>
<option value="Urldecode"<?php echo selected($action_str, 'Urldecode'); ?>>urldecode()</option>
<option value="Unserialize"<?php echo selected($action_str, 'Unserialize'); ?>>unserialize()</option>