diff options
Diffstat (limited to 'lib/helpers.php')
-rw-r--r-- | lib/helpers.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/helpers.php b/lib/helpers.php index 60eda75..cf751c6 100644 --- a/lib/helpers.php +++ b/lib/helpers.php @@ -27,6 +27,10 @@ function partial($template, $data=array(), $debug=false) { return ob_get_clean(); } +function js_bookmarklet($partial, $context) { + return str_replace('+','%20',urlencode(str_replace(array("\n"),array(''),partial($partial, $context)))); +} + function session($key) { if(array_key_exists($key, $_SESSION)) return $_SESSION[$key]; |