You are here

function _emptyparagraphkiller_prepare in Empty paragraph killer 7

Prepare callback for the emptyparagraphkiller filter.

1 string reference to '_emptyparagraphkiller_prepare'
emptyparagraphkiller_filter_info in ./emptyparagraphkiller.module
Implements hook_filter_info().

File

./emptyparagraphkiller.module, line 26
Empty paragraph killer: because users are sometimes overzealous with the return key.

Code

function _emptyparagraphkiller_prepare($text, $filter) {
  return preg_replace('/<p[^>]*>(&nbsp;|\\s)*<\\/p>/ui', '[empty-para]', $text);
}