summaryrefslogtreecommitdiff
path: root/smartyplugins/modifier.htmlToText.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/modifier.htmlToText.php')
-rw-r--r--smartyplugins/modifier.htmlToText.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/smartyplugins/modifier.htmlToText.php b/smartyplugins/modifier.htmlToText.php
new file mode 100644
index 0000000..c1c4107
--- /dev/null
+++ b/smartyplugins/modifier.htmlToText.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage plugins
+ */
+
+
+/**
+ * Smarty htmlToText modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: html2text<br>
+ * Purpose: transform a html to a text version
+ * @param string
+ */
+function smarty_modifier_htmlToText( $string ) {
+ return preg_replace('/<.*>/U', '', $string);
+}
+?>