You are here

function _geshifilter_prepare_php_callback in GeSHi Filter for syntax highlighting 7

Same name and namespace in other branches
  1. 5.2 geshifilter.pages.inc \_geshifilter_prepare_php_callback()
  2. 6 geshifilter.pages.inc \_geshifilter_prepare_php_callback()

_geshifilter_prepare callback for < ?php ... ? > blocks.

1 call to _geshifilter_prepare_php_callback()
_geshifilter_prepare in ./geshifilter.pages.inc
geshifilter_filter callback for preparing input text.

File

./geshifilter.pages.inc, line 221

Code

function _geshifilter_prepare_php_callback($match, $format) {

  // Decode HTML entities if option has been set
  if (geshifilter_decode_entities($format)) {
    $match[2] = html_entity_decode($match[2], ENT_QUOTES);
  }
  return '[geshifilter-questionmarkphp]' . str_replace(array(
    "\r",
    "\n",
  ), array(
    '',
    '&#10;',
  ), check_plain($match[2])) . '[/geshifilter-questionmarkphp]';
}