You are here

function twitter_views_handler_field_xss::render in Twitter 7.5

Same name and namespace in other branches
  1. 6.5 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  2. 6.2 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  3. 6.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  4. 6.4 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  5. 7.6 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  6. 7.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
  7. 7.4 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()

Processes the message through the selected options.

Overrides views_handler_field::render

File

./twitter_views_field_handlers.inc, line 47
Views handlers for Twitter module.

Class

twitter_views_handler_field_xss
Process Twitter-style @usernames and URLs before filtering XSS.

Code

function render($values) {
  $value = $values->{$this->field_alias};

  // Load the options.
  $usernames = TRUE;
  if (isset($this->options['link_usernames'])) {
    $usernames = $this->options['link_usernames'];
  }
  $hashtags = TRUE;
  if (isset($this->options['link_hashtags'])) {
    $hashtags = $this->options['link_hashtags'];
  }
  $attributes = TRUE;
  if (isset($this->options['link_attributes'])) {
    $attributes = $this->options['link_attributes'];
  }
  $urls = TRUE;
  if (isset($this->options['link_urls'])) {
    $urls = $this->options['link_urls'];
  }

  // Offload processing to the shared function.
  return twitter_filter_message($value, $usernames, $hashtags, $attributes, $urls);
}