Merge pull request #21 from gnuheidix/master
Clean rendering of <tags>, whitespace at class attr. Thanks a lot to @gnuheldix for providing this patch!
This commit is contained in:
commit
aba6e7c0dc
|
@ -438,8 +438,8 @@ class Twitter {
|
|||
if (!empty($class_links)) $class = 'class="' . $class_links . '"';
|
||||
$status = preg_replace($pattern, '<a href="$1" ' .$class .'>' . $linktext_replace . '</a>', $status);
|
||||
if ($this->use_identica) {
|
||||
$status = preg_replace('{#([\w_]*)}','#<a href="' . $this->get_base_url() . 'tag/$1"' . $class . '>$1</a>', $status);
|
||||
$status = preg_replace('{!([\w_]*)}','!<a href="' . $this->get_base_url() . 'group/$1"' . $class . '>$1</a>', $status);
|
||||
$status = preg_replace('{#([\w_]*)}','#<a href="' . $this->get_base_url() . 'tag/$1" ' . $class . '>$1</a>', $status);
|
||||
$status = preg_replace('{!([\w_]*)}','!<a href="' . $this->get_base_url() . 'group/$1" ' . $class . '>$1</a>', $status);
|
||||
}
|
||||
|
||||
$class = '';
|
||||
|
|
|
@ -284,6 +284,7 @@ class serendipity_plugin_twitter extends serendipity_plugin {
|
|||
if (LANG_CHARSET!='UTF-8' && function_exists("mb_convert_encoding")) {
|
||||
$status->text = mb_convert_encoding($status->text, LANG_CHARSET, 'auto');
|
||||
}
|
||||
$status->text = htmlentities($status->text, ENT_QUOTES, 'UTF-8');
|
||||
$showit = true;
|
||||
if ($filter_all_user && preg_match('/@/',$status->text)) $showit=false;
|
||||
else if ($toall_only && preg_match('/^@/',$status->text)) $showit=false;
|
||||
|
|
Loading…
Reference in a new issue