You are here

function pasteformat_cleanup in Paste Format (filter, clean-up pasted text) 7

Same name and namespace in other branches
  1. 6 pasteformat.module \pasteformat_cleanup()

Menu callback to cleanup POSTed text.

1 string reference to 'pasteformat_cleanup'
pasteformat_menu in ./pasteformat.module
Implements hook_menu().

File

./pasteformat.module, line 47
Main file for Paste Format module.

Code

function pasteformat_cleanup() {
  $output = array(
    'text' => check_markup($_POST['html'], variable_get('pasteformat_cleanup_format', filter_fallback_format()), '', FALSE),
    // 'text' => $_POST['html'],
    'alert' => variable_get('pasteformat_message_success', '') ? variable_get('pasteformat_message_success', '') : '',
  );
  drupal_json_output($output);
  exit;
}