Skip to content

Commit

Permalink
Updating the Twitter and Url plug-ins to clean the outputted strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aypok authored and Bittarman committed May 6, 2010
1 parent 3ad15b8 commit a653b91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Phergie/Plugin/Twitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@ public function onCommandTweet($txt)
*/
protected function formatTweet(StdClass $tweet, $includeUrl = true)
{
$body = Phergie_Plugin_Helper_String::cleanString($tweet->text);
$ts = new Phergie_Plugin_Helper_Time($tweet->created_at);
$out = '<@' . $tweet->user->screen_name .'> '. $tweet->text
$out = '<@' . $tweet->user->screen_name .'> '. $body
. ' - ' . $ts->getCountDown() . ' ago';
if ($includeUrl) {
$out .= ' (' . $this->twitter->getUrlOutputStatus($tweet) . ')';
Expand Down
3 changes: 3 additions & 0 deletions Phergie/Plugin/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,9 @@ public function getTitle($url)
$title = 'No Title';
}
}

// Sanitise the title.
$title = Phergie_Plugin_Helper_String::cleanString($title);

return $title;
}
Expand Down

0 comments on commit a653b91

Please sign in to comment.