function twitter_views_handler_field_xss::render in Twitter 6.4
Same name and namespace in other branches
- 6.5 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 6.2 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 6.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 7.6 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 7.3 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 7.4 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
- 7.5 twitter_views_field_handlers.inc \twitter_views_handler_field_xss::render()
File
- ./
twitter_views_field_handlers.inc, line 41
Class
- twitter_views_handler_field_xss
- Process Twitter-style @usernames and URLs before filtering XSS.
Code
function render($values) {
$value = $values->{$this->field_alias};
if (!empty($this->options['link_urls'])) {
$value = _filter_url($value, FILTER_DEFAULT);
}
if (!empty($this->options['link_usernames'])) {
$value = twitter_link_filter($value);
}
if (!empty($this->options['link_hashtags']) && valid_url($this->options['hashtags_url'])) {
$value = twitter_link_filter($value, '#', url($this->options['hashtags_url']));
}
return filter_xss($value);
}