From 865a4c94a21c9ab28f50bad464a774620b2745a5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 19 Jun 2007 16:18:47 +0200 Subject: [PATCH] added missing smarty files darcs-hash:20070619141847-6e07b-379989e17df92f7f977ce78d7eac9755eac7e1e7.gz --- inc/smarty/plugins/modifier.h.php | 22 +++++++++++++++++++ inc/smarty/plugins/modifier.http.php | 33 ++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 inc/smarty/plugins/modifier.h.php create mode 100644 inc/smarty/plugins/modifier.http.php diff --git a/inc/smarty/plugins/modifier.h.php b/inc/smarty/plugins/modifier.h.php new file mode 100644 index 0000000..84274bf --- /dev/null +++ b/inc/smarty/plugins/modifier.h.php @@ -0,0 +1,22 @@ + + * Name: h
+ */ +function smarty_modifier_h($string, $esc_type = 'html', $char_set = 'ISO-8859-1') +{ + return smarty_modifier_escape($string,'html','UTF-8'); +} + +/* vim: set expandtab: */ + +?> diff --git a/inc/smarty/plugins/modifier.http.php b/inc/smarty/plugins/modifier.http.php new file mode 100644 index 0000000..a3fffbc --- /dev/null +++ b/inc/smarty/plugins/modifier.http.php @@ -0,0 +1,33 @@ + + * @param string + * @return string + */ +function smarty_modifier_http($string){ + if(!$string) return ''; + + if(!preg_match('#^\w+://#',$string)){ + $string = 'http://'.$string; + } + + return $string; +} + +/* vim: set expandtab: */ + +?> -- 2.39.5