Created
December 22, 2014 15:12
-
-
Save PoTHuYJoHN/ba0a0b330030ed5d757b to your computer and use it in GitHub Desktop.
Convert double quotes to single for Facebook share
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 | |
/** | |
* Persist quotes. For Facebook share etc. | |
* @param string $value | |
* | |
* @return mixed | |
*/ | |
public static function convertQuotes($value) | |
{ | |
return str_replace('"', '\'', htmlspecialchars_decode($value, ENT_QUOTES)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment