Remove DoubleEntityDecode
Also switch from tabs to spaces.
This commit is contained in:
parent
d9126e1105
commit
70770d7cac
15
classes.php
15
classes.php
@ -83,21 +83,6 @@ 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
|
class ActionBase64Decode extends AbstractAction
|
||||||
{
|
{
|
||||||
public function __construct( $value )
|
public function __construct( $value )
|
||||||
|
47
index.php
47
index.php
@ -1,9 +1,9 @@
|
|||||||
<!DOCTYPE HTML>
|
<!DOCTYPE HTML>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>PHP Tools</title>
|
<title>PHP Tools</title>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css">
|
<link rel="stylesheet" type="text/css" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
@ -23,37 +23,36 @@ $action = null;
|
|||||||
$action_str = isset($_POST['action']) ? $_POST['action'] : null;
|
$action_str = isset($_POST['action']) ? $_POST['action'] : null;
|
||||||
|
|
||||||
if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
if( 'POST' === $_SERVER['REQUEST_METHOD'] ) {
|
||||||
$class = "Action" . $action_str;
|
$class = "Action" . $action_str;
|
||||||
$action = new $class( $_POST['data'] );
|
$action = new $class( $_POST['data'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="cols">
|
<div class="cols">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<textarea class="data" name="data"><?php if( $action ) echo $action->esc_raw(); ?></textarea><br>
|
<textarea class="data" name="data"><?php if( $action ) echo $action->esc_raw(); ?></textarea><br>
|
||||||
<select name="action">
|
<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="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="QuotedPrintableEncode" <?php echo selected($action_str, 'QuotedPrintableEncode'); ?>>quoted_printable_encode()</option>
|
<option value="Urlencode" <?php echo selected($action_str, 'Urlencode'); ?>>urlencode()</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="Urldecode"<?php echo selected($action_str, 'Urldecode'); ?>>urldecode()</option>
|
<option value="Unserialize"<?php echo selected($action_str, 'Unserialize'); ?>>unserialize()</option>
|
||||||
<option value="Unserialize"<?php echo selected($action_str, 'Unserialize'); ?>>unserialize()</option>
|
<option value="Base64Decode"<?php echo selected($action_str, 'Base64Decode'); ?>>base64_decode()</option>
|
||||||
<option value="Base64Decode"<?php echo selected($action_str, 'Base64Decode'); ?>>base64_decode()</option>
|
<option value="Base64Encode"<?php echo selected($action_str, 'Base64Encode'); ?>>base64_encode()</option>
|
||||||
<option value="Base64Encode"<?php echo selected($action_str, 'Base64Encode'); ?>>base64_encode()</option>
|
<select>
|
||||||
<select>
|
<input type="submit">
|
||||||
<input type="submit">
|
</form>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
<?php if( $action ) echo $action; ?>
|
||||||
<?php if( $action ) echo $action; ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Randomness</h2>
|
<h2>Randomness</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>MD5: <input class="randomness-box" value="<?php echo md5(uniqid(mt_rand(), true)); ?>"></li>
|
<li>MD5: <input class="randomness-box" value="<?php echo md5(uniqid(mt_rand(), true)); ?>"></li>
|
||||||
<li>SHA1: <input class="randomness-box" value="<?php echo sha1(uniqid(mt_rand(), true)); ?>"></li>
|
<li>SHA1: <input class="randomness-box" value="<?php echo sha1(uniqid(mt_rand(), true)); ?>"></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user