aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2013-01-13 22:31:48 +0000
committerNathan Lasseter <nathan@4574.co.uk>2013-01-13 22:31:48 +0000
commit45282de77b28a315880d8f0d3e91aada32799237 (patch)
tree32ca05b45f85428b1aa23ce50a6f977ac39c3342
parent2228c5b1bc1e4c9a7daff5a076928babc8cf5398 (diff)
Hack to support nginx
-rw-r--r--viewpost.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/viewpost.php b/viewpost.php
index c2121aa..96b43af 100644
--- a/viewpost.php
+++ b/viewpost.php
@@ -4,6 +4,7 @@
exit(0);
}
require("settings.php");
+ $getpost = preg_replace('/\+/', ' ', $_GET['post']);
?>
<!DOCTYPE html>
@@ -24,11 +25,11 @@
</div>
<?php
- $file = $_GET['post'];
+ $file = $getpost;
echo "<div>\n";
echo "<a class=\"title\" href=\"{$blogRoot}post/" . urlencode($file) . "\">$file <span id=\"perma\">[Permalink]</span></a> ";
?>
-<a href="https://twitter.com/share" class="twitter-share-button" data-text="<?php echo "$blogTitle: {$_GET['post']}"; ?>">[Tweet]</a>
+<a href="https://twitter.com/share" class="twitter-share-button" data-text="<?php echo "$blogTitle: {$getpost}"; ?>">[Tweet]</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
<?php