sync
authorBlastytheBlue <blastofmn@gmail.com>
Thu, 11 Dec 2014 10:37:53 +0000 (18:37 +0800)
committerBlastytheBlue <blastofmn@gmail.com>
Thu, 11 Dec 2014 10:37:53 +0000 (18:37 +0800)
1  2 
Reddit/Embedly.php

@@@ -9,7 -9,18 +9,18 @@@ class Reddit_Embedly extends HTML_Flexy
      function get()
      {
          
 -        $url = htmlspecialchars($_REQUEST['url']);
 +        $url = htmlspecialchars(($_REQUEST['url']));
+         $raw_ul = $_REQUEST['url'];
+         $ar = parse_url($raw_ul);
+         if (preg_match('/twitter/i', $ar['host'])) {
+             $this->getTwitter($url);
+             exit;
+         }
+         
+         
+         
+         $url = htmlspecialchars($_REQUEST['url']);
          
          echo '<a class="embedly-card" href="'. $url . '">'.$url  . '</a>
          <script async src="//cdn.embedly.com/widgets/platform.js" charset="UTF-8"></script>';