Drowning in email? Try Inbox Zero to learn sane tips for dealing with high-volume email. And don’t miss the free Inbox Zero video. »
Register for free on 43 Folders to comment on articles, post to our forum, customize your visits, and much more. Current users can login now.
| EXPLORE 43Folders | THE GOOD STUFF |
If you're going to use...
If you’re going to use Andrew’s script, please change markdown_file_results.php to read:
<?php include_once "markdown.php";$filename = $_GET[theFile];
if preg_match(‘[^A-Za-z0-9.-_]’, $filename) { exit (“Invalid filename supplied”); }
$fp = fopen($filename, ‘r’); $my_text = fread($fp, filesize($filename)); fclose($fp); $my_html = Markdown($my_text); ?>
The original version could allow bad people to read files they shouldn’t. This is particularly important if you’re putting this up on the internet.
Props to Andrew for putting useful code in the world and saving us from having to do it ourselves. :)