Permalink
Browse files

fixed a bug where links were being rewritten improperly

  • Loading branch information...
1 parent f7d95bd commit e7f70880e267c051ce3d6ee7fdeeac9f86c2a352 @slifty committed Apr 26, 2012
Showing with 7 additions and 2 deletions.
  1. +5 −0 static-files/published-hack/top-bar.css
  2. +2 −2 static-files/remix.php
@@ -1,3 +1,8 @@
+.hackpub-top-bar * {
+ padding: 0px;
+ margin: 0px;
+}
+
.hackpub-top-bar {
position: absolute;
top: 0px;
@@ -108,8 +108,8 @@ function get_final_url( $url, $timeout = 5 ) {
$data = preg_replace('/src=\'\/(.*?)\'/i', "src='".$url_base."/\\1'", $data);
// General Link Fixes
- $data = preg_replace('/href=\"\/(.*?)\"/i', "src=\"".$url_base."/\\1\"", $data);
- $data = preg_replace('/href=\'\/(.*?)\'/i', "src='".$url_base."/\\1'", $data);
+ $data = preg_replace('/href=\"\/(.*?)\"/i', "href=\"".$url_base."/\\1\"", $data);
+ $data = preg_replace('/href=\'\/(.*?)\'/i', "href='".$url_base."/\\1'", $data);
// CSS Link Fixes
$data = preg_replace('/\<link(.*?)text\/css(.*?)src\=(.*?)\/\>/i', "<link\\1text/css\\2href=\\3/>", $data);

0 comments on commit e7f7088

Please sign in to comment.