Skip to content

Instantly share code, notes, and snippets.

@valentijnscholten
Created April 27, 2015 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valentijnscholten/280bab11a6b2d52cb1bc to your computer and use it in GitHub Desktop.
Save valentijnscholten/280bab11a6b2d52cb1bc to your computer and use it in GitHub Desktop.
Changing this:
/**
* Transform some characters in valid bbcodes
*/
function bbcode_specialchars($text)
{
$str_from = array('<', '>', '[', ']', '.', ':');
$str_to = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;');
return str_replace($str_from, $str_to, $text);
}
Into:
/**
* Transform some characters in valid bbcodes
*/
function bbcode_specialchars($text)
{
//$str_from = array('<', '>', '[', ']', '.', ':');
//$str_to = array('&lt;', '&gt;', '&#91;', '&#93;', '&#46;', '&#58;');
//return str_replace($str_from, $str_to, $text);
return $text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment