summaryrefslogtreecommitdiff
path: root/it_html.class
diff options
context:
space:
mode:
authorUrban Müller2016-10-19 15:07:04 +0200
committerUrban Müller2016-10-19 15:07:04 +0200
commit2ecd3c8798a01ad2886514ac75cdb55a8c188b05 (patch)
treed92f5e4cb3459debd664a8d5de6fc8588220a71d /it_html.class
parentfea5a8053146b6b01748f442cb2c41a3dd061d82 (diff)
downloaditools-2ecd3c8798a01ad2886514ac75cdb55a8c188b05.tar.gz
itools-2ecd3c8798a01ad2886514ac75cdb55a8c188b05.tar.bz2
itools-2ecd3c8798a01ad2886514ac75cdb55a8c188b05.zip
fix phan warnings
Diffstat (limited to 'it_html.class')
-rw-r--r--it_html.class10
1 files changed, 6 insertions, 4 deletions
diff --git a/it_html.class b/it_html.class
index 7d3fba9..1ca2acf 100644
--- a/it_html.class
+++ b/it_html.class
@@ -56,6 +56,8 @@ class it_html
{
static $voidtags = array('area' => 1, 'base' => 1, 'br' => 1, 'col' => 1, 'command' => 1, 'embed' => 1, 'hr' => 1, 'img' => 1, 'input' => 1, 'keygen' => 1, 'link' => 1, 'meta' => 1, 'param' => 1, 'source' => 1, 'track' => 1, 'wbr' => 1); # need no closing tag
+ var $p; # constructor params plus defaults
+
/**
* Create a HTML object and global functions for all methods (exlcluding
* methods starting with '_') in this class plus the default tags (see below).
@@ -134,7 +136,7 @@ function it_html($p = array())
* @param $p Configuration settings. Can be set/overridden in constructor, configure(), html() or head().
* See constructor for a list of supported values
*/
-function configure($p)
+static function configure($p)
{
$ithtml = $GLOBALS[$p['name'] ? $p['name'] : "it_html"];
$ithtml->p = $p + (array)$ithtml->p;
@@ -436,7 +438,7 @@ function _strip_tags($html)
* @param $html HTML string to be sanitized
* @return Sanitized HTML
*/
-function sanitize($html)
+static function sanitize($html)
{
$result = "";
$charset = $GLOBALS['it_html']->p['charset'] ? $GLOBALS['it_html']->p['charset'] : 'iso-8859-1';
@@ -491,7 +493,7 @@ function entity_decode($string)
/**
* Replace or remove all illegal characters from a HTML string (knows utf-8 and latin1)
*/
-function _cleanup($string, $charset)
+static function _cleanup($string, $charset)
{
$result = $charset == "utf-8"
? preg_replace('/\xc2[\x80-\x9f]/', ' ', $string)
@@ -505,7 +507,7 @@ function _cleanup($string, $charset)
* @param $string String to encode with htmlspecialchars()
* @return htmlspecialchars($string)
*/
-function Q($string)
+static function Q($string)
{
$string = @strval($string);
if (preg_match('/[<>&"\x00-\x08\x0a-\x0c\x0e-\x1f\x80-\xff]/', $string)) # WARNING: copy/pasted to _tag()