Reddit/Embedly.php
authorAlan Knowles <alan@roojs.com>
Tue, 9 Dec 2014 08:43:49 +0000 (16:43 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 9 Dec 2014 08:43:49 +0000 (16:43 +0800)
Reddit/Embedly.php

index dde2323..1c9798e 100644 (file)
@@ -10,9 +10,11 @@ class Reddit_Embedly extends HTML_FlexyFramework_Page {
     {
         
         $raw_ul = $_REQUEST['url'];
+        $url = htmlspecialchars($_REQUEST['url']);
+
         $ar = parse_url($raw_ul);
         if (preg_match('/twitter/i', $ar['host'])) {
-            $this->getTwitter();
+            $this->getTwitter($url);
             exit;
         }
         
@@ -31,7 +33,7 @@ class Reddit_Embedly extends HTML_FlexyFramework_Page {
     {
         echo '<html><head><style type="text/css">html, iframe, body, object, embed, div, span, p { margin: 0; padding: 0; } iframe { max-width: 100%; }</style>
         </head><body><blockquote class="twitter-tweet" width="485"><p>
-        <a href="https://twitter.com/krislc/status/542228550837747712">December 9, 2014</a>
+        <a href="'.$url . '">December 9, 2014</a>
         <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></body></html>';
         exit;
     }