1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 06:07:26 +02:00

Remove trailing whitespace.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
Edward Z. Yang
2008-12-06 02:28:20 -05:00
parent 3a6b63dff1
commit 2c955af135
476 changed files with 5595 additions and 5547 deletions

View File

@@ -5,23 +5,23 @@
class HTMLPurifier_Printer
{
/**
* Instance of HTMLPurifier_Generator for HTML generation convenience funcs
*/
protected $generator;
/**
* Instance of HTMLPurifier_Config, for easy access
*/
protected $config;
/**
* Initialize $generator.
*/
public function __construct() {
}
/**
* Give generator necessary configuration if possible
*/
@@ -30,13 +30,13 @@ class HTMLPurifier_Printer
$context = new HTMLPurifier_Context();
$this->generator = new HTMLPurifier_Generator($config, $context);
}
/**
* Main function that renders object or aspect of that object
* @note Parameters vary depending on printer
*/
// function render() {}
/**
* Returns a start tag
* @param $tag Tag name
@@ -47,7 +47,7 @@ class HTMLPurifier_Printer
new HTMLPurifier_Token_Start($tag, $attr ? $attr : array())
);
}
/**
* Returns an end teg
* @param $tag Tag name
@@ -57,7 +57,7 @@ class HTMLPurifier_Printer
new HTMLPurifier_Token_End($tag)
);
}
/**
* Prints a complete element with content inside
* @param $tag Tag name
@@ -70,19 +70,19 @@ class HTMLPurifier_Printer
($escape ? $this->escape($contents) : $contents) .
$this->end($tag);
}
protected function elementEmpty($tag, $attr = array()) {
return $this->generator->generateFromToken(
new HTMLPurifier_Token_Empty($tag, $attr)
);
}
protected function text($text) {
return $this->generator->generateFromToken(
new HTMLPurifier_Token_Text($text)
);
}
/**
* Prints a simple key/value row in a table.
* @param $name Key
@@ -97,7 +97,7 @@ class HTMLPurifier_Printer
$this->end('tr')
;
}
/**
* Escapes a string for HTML output.
* @param $string String to escape
@@ -107,7 +107,7 @@ class HTMLPurifier_Printer
$string = htmlspecialchars($string, ENT_COMPAT, 'UTF-8');
return $string;
}
/**
* Takes a list of strings and turns them into a single list
* @param $array List of strings
@@ -125,7 +125,7 @@ class HTMLPurifier_Printer
}
return $ret;
}
/**
* Retrieves the class of an object without prefixes, as well as metadata
* @param $obj Object to determine class of
@@ -162,6 +162,6 @@ class HTMLPurifier_Printer
$class .= ')';
return $class;
}
}