summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-04-03 22:28:15 +0200
committerchris <chris@jalakai.co.uk>2006-04-03 22:28:15 +0200
commitd519720692b97f1c1705a3cce804749068fea697 (patch)
treeddaa7fb914ff22c582659055d5f4e0f3f8a58e7b
parentab77016bb3d1f490604f27ebc2f23c4372ca859d (diff)
downloadrpg-d519720692b97f1c1705a3cce804749068fea697.tar.gz
rpg-d519720692b97f1c1705a3cce804749068fea697.tar.bz2
move hsc() & ptln() functions from template.php to common.php
darcs-hash:20060403202815-9b6ab-1b499148333458ee8acb68b5e38ca72d3b1c9b3c.gz
-rw-r--r--inc/common.php22
-rw-r--r--inc/template.php22
2 files changed, 22 insertions, 22 deletions
diff --git a/inc/common.php b/inc/common.php
index 6f3cad2e4..8af63002c 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -21,6 +21,28 @@ define('RECENTS_SKIP_MINORS',4);
define('RECENTS_SKIP_SUBSPACES',8);
/**
+ * Wrapper around htmlspecialchars()
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @see htmlspecialchars()
+ */
+function hsc($string){
+ return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
+}
+
+/**
+ * print a newline terminated string
+ *
+ * You can give an indention as optional parameter
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function ptln($string,$intend=0){
+ for($i=0; $i<$intend; $i++) print ' ';
+ print"$string\n";
+}
+
+/**
* Return info about the current document as associative
* array.
*
diff --git a/inc/template.php b/inc/template.php
index 488ce211b..bda0a7e4b 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -10,28 +10,6 @@
require_once(DOKU_CONF.'dokuwiki.php');
/**
- * Wrapper around htmlspecialchars()
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @see htmlspecialchars()
- */
-function hsc($string){
- return htmlspecialchars($string);
-}
-
-/**
- * print a newline terminated string
- *
- * You can give an indention as optional parameter
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- */
-function ptln($string,$intend=0){
- for($i=0; $i<$intend; $i++) print ' ';
- print"$string\n";
-}
-
-/**
* Returns the path to the given template, uses
* default one if the custom version doesn't exist
*