Last active
February 29, 2016 21:16
-
-
Save jeremysells/46d3007e8f5563a467ce to your computer and use it in GitHub Desktop.
Showing html escape
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$value = "some\"string'™"; | |
?> | |
<form name="test" action="<?php echo time(); ?>" method="POST"> | |
<input type="text" value="<?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?>" name="test"> | |
<input type="submit" value="go" name="go" /> | |
</form> | |
<br/> | |
<br/> | |
<p>Note: There is no escaping on the output for demo</p> | |
<br/> | |
result = [<?php echo isset($_POST["test"]) ? $_POST["test"] : ""; ?>] | |
<?php | |
xdebug_break(); | |
$stop = "ok"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment