You are here

function _shoutbox_sanitize_shout in Shoutbox 6.2

Same name and namespace in other branches
  1. 5 shoutbox.module \_shoutbox_sanitize_shout()
  2. 6 shoutbox.module \_shoutbox_sanitize_shout()
  3. 7.2 shoutbox.module \_shoutbox_sanitize_shout()
  4. 7 shoutbox.module \_shoutbox_sanitize_shout()

This function cleans the shout object before it is used.

Parameters

&$shout: The shout post object.

4 calls to _shoutbox_sanitize_shout()
shoutbox_delete_form in ./shoutbox.pages.inc
Shout delete confirmation form
shoutbox_display_posts in ./shoutbox.module
Output existing shoutbox posts as html.
shoutbox_publish_form in ./shoutbox.pages.inc
Shout publish confirmation form
shoutbox_unpublish_form in ./shoutbox.pages.inc
Shout unpublish confirmation form

File

./shoutbox.module, line 671
Shout box module displays a block for users to create short messages for the whole site. Uses AHAH to update the database and display content.

Code

function _shoutbox_sanitize_shout(&$shout) {
  $shout->nick = check_plain($shout->nick);

  // Check is escape HTML is enabled
  if (variable_get('shoutbox_escape_html', 1)) {

    // Ignore filter formats - remove everything
    $shout->shout = check_plain($shout->shout);
  }
  else {
    $shout->shout = check_markup($shout->shout, variable_get('shoutbox_filter_format', 1), FALSE);
  }
}