Last active
December 18, 2015 03:18
-
-
Save giovanniramos/5716880 to your computer and use it in GitHub Desktop.
Converts a character from a colon to HTML
This file contains 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 | |
/** | |
* Converts a character from a colon to HTML | |
* | |
* @param string $value The input string | |
* @return string | |
* @link https://gist.github.com/5716880 | |
* | |
* */ | |
function htmlColon($value) | |
{ | |
$value = preg_replace('~[:]~', ':', htmlentities($value)); | |
return $value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment