diff --git a/twitter-pull-listing.tpl.php b/twitter-pull-listing.tpl.php
index 4568605..0b9a89b 100644
--- a/twitter-pull-listing.tpl.php
+++ b/twitter-pull-listing.tpl.php
@@ -40,12 +40,12 @@
         <div class="tweet-author-wrapper clearfix">
           <div class="tweet-author-info clearfix">
             <div class="tweet-authorphoto">
-              <?php print l("<img src=\"$tweet->userphoto\" alt=\"$tweet->username\" />", 'https://twitter.com/' . $tweet->screenname, array('html' => TRUE)); ?>
+              <?php print l("<img src=\"$tweet->userphoto\" alt=\"$tweet->username\" />", '//twitter.com/' . $tweet->screenname, array('html' => true, 'external' => true)); ?>
             </div>
             <div class="tweet-author"><?php print l($tweet->username, 'https://twitter.com/' . $tweet->screenname); ?></div>
-            <div class="tweet-screenname"><?php print l('@' . $tweet->screenname, 'https://twitter.com/' . $tweet->screenname); ?></div>
+            <div class="tweet-screenname"><?php print l('@' . $tweet->screenname, '//twitter.com/' . $tweet->screenname, array('external' => true)); ?></div>
           </div>
-          <?php print l(t("Follow @$tweet->screenname"), 'https://twitter.com/' . $tweet->screenname, array('attributes'=> array(
+          <?php print l(t("Follow @$tweet->screenname"), '//twitter.com/' . $tweet->screenname, array('external' => true,'attributes'=> array(
               'class' => array('twitter-follow-button'),
               'data-show-count' => 'false',
               'data-lang' => $language,
@@ -59,14 +59,14 @@
           <?php if (isset($tweet->no_tweets)): ?>
           <?php print t($tweet->time_ago); ?>
           <?php else: ?>
-          <?php print l($tweet->time_ago, 'http://twitter.com/' . $tweet->screenname . '/status/' . $tweet->id);?>
+          <?php print l($tweet->time_ago, '//twitter.com/' . $tweet->screenname . '/status/' . $tweet->id, array('external' => true));?>
           <?php endif; ?>
           </div>
           <?php if (!isset($tweet->no_tweets)): ?>
           <div class="tweet-actions">
-            <?php print l('Reply', "https://twitter.com/intent/tweet?in_reply_to=$tweet->id", array('attributes' => array('class' => 'twitter-reply'))); ?>
-            <?php print l('Retweet', "https://twitter.com/intent/retweet?tweet_id=$tweet->id", array('attributes' => array('class' => 'twitter-retweet'))); ?>
-            <?php print l('Favorite', "https://twitter.com/intent/favorite?tweet_id=$tweet->id", array('attributes' => array('class' => 'twitter-favorite'))); ?>
+            <?php print l('Reply', "//twitter.com/intent/tweet?in_reply_to=$tweet->id", array('external' => true, 'attributes' => array('class' => 'twitter-reply'))); ?>
+            <?php print l('Retweet', "//twitter.com/intent/retweet?tweet_id=$tweet->id", array('external' => true, 'attributes' => array('class' => 'twitter-retweet'))); ?>
+            <?php print l('Favorite', "//twitter.com/intent/favorite?tweet_id=$tweet->id", array('external' => true, 'attributes' => array('class' => 'twitter-favorite'))); ?>
           </div>
           <?php endif; ?>
         </div>
diff --git a/twitter_pull.module b/twitter_pull.module
index b56f409..4a17884 100644
--- a/twitter_pull.module
+++ b/twitter_pull.module
@@ -231,11 +231,11 @@ function twitter_pull_add_links($text) {
   $text = preg_replace($pattern, $repl, $text);
 
   $pattern = '#@(\w+)#ims';
-  $repl = '<a href="http://twitter.com/$1" rel="nofollow" title="@$1">@$1</a>';
+  $repl = '<a href="//twitter.com/$1" rel="nofollow" title="@$1">@$1</a>';
   $text = preg_replace($pattern, $repl, $text);
 
   $pattern = '/[#]+([A-Za-z0-9-_]+)/';
-  $repl = '<a href="http://twitter.com/#!/search?q=%23$1" title="#$1" rel="nofollow">#$1</a>';
+  $repl = '<a href="//twitter.com/#!/search?q=%23$1" title="#$1" rel="nofollow">#$1</a>';
   $text = preg_replace($pattern, $repl, $text);
 
   return filter_xss($text);
