Skip to content

Commit

Permalink
Explicitly declare public things as public (Miguel Vazquez Gocobachi)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/HTML_Safe/trunk@287148 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
CloCkWeRX committed Aug 12, 2009
1 parent 2c2563a commit b290a22
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions HTML/Safe.php
Expand Up @@ -125,67 +125,67 @@ class HTML_Safe
* *
* @var array * @var array
*/ */
var $singleTags = array('area', 'br', 'img', 'input', 'hr', 'wbr', ); public $singleTags = array('area', 'br', 'img', 'input', 'hr', 'wbr', );


/** /**
* List of dangerous tags (such tags will be deleted) * List of dangerous tags (such tags will be deleted)
* *
* @var array * @var array
*/ */
var $deleteTags = array( public $deleteTags = array(
'applet', 'base', 'basefont', 'bgsound', 'blink', 'body', 'applet', 'base', 'basefont', 'bgsound', 'blink', 'body',
'embed', 'frame', 'frameset', 'head', 'html', 'ilayer', 'embed', 'frame', 'frameset', 'head', 'html', 'ilayer',
'iframe', 'layer', 'link', 'meta', 'object', 'style', 'iframe', 'layer', 'link', 'meta', 'object', 'style',
'title', 'script', 'title', 'script',
); );


/** /**
* List of dangerous tags (such tags will be deleted, and all content * List of dangerous tags (such tags will be deleted, and all content
* inside this tags will be also removed) * inside this tags will be also removed)
* *
* @var array * @var array
*/ */
var $deleteTagsContent = array('script', 'style', 'title', 'xml', ); public $deleteTagsContent = array('script', 'style', 'title', 'xml', );


/** /**
* Type of protocols filtering ('white' or 'black') * Type of protocols filtering ('white' or 'black')
* *
* @var string * @var string
*/ */
var $protocolFiltering = 'white'; public $protocolFiltering = 'white';


/** /**
* List of "dangerous" protocols (used for blacklist-filtering) * List of "dangerous" protocols (used for blacklist-filtering)
* *
* @var array * @var array
*/ */
var $blackProtocols = array( public $blackProtocols = array(
'about', 'chrome', 'data', 'disk', 'hcp', 'about', 'chrome', 'data', 'disk', 'hcp',
'help', 'javascript', 'livescript', 'lynxcgi', 'lynxexec', 'help', 'javascript', 'livescript', 'lynxcgi', 'lynxexec',
'ms-help', 'ms-its', 'mhtml', 'mocha', 'opera', 'ms-help', 'ms-its', 'mhtml', 'mocha', 'opera',
'res', 'resource', 'shell', 'vbscript', 'view-source', 'res', 'resource', 'shell', 'vbscript', 'view-source',
'vnd.ms.radio', 'wysiwyg', 'vnd.ms.radio', 'wysiwyg',
); );


/** /**
* List of "safe" protocols (used for whitelist-filtering) * List of "safe" protocols (used for whitelist-filtering)
* *
* @var array * @var array
*/ */
var $whiteProtocols = array( public $whiteProtocols = array(
'ed2k', 'file', 'ftp', 'gopher', 'http', 'https', 'ed2k', 'file', 'ftp', 'gopher', 'http', 'https',
'irc', 'mailto', 'news', 'nntp', 'telnet', 'webcal', 'irc', 'mailto', 'news', 'nntp', 'telnet', 'webcal',
'xmpp', 'callto', 'xmpp', 'callto',
); );


/** /**
* List of attributes that can contain protocols * List of attributes that can contain protocols
* *
* @var array * @var array
*/ */
var $protocolAttributes = array( public $protocolAttributes = array(
'action', 'background', 'codebase', 'dynsrc', 'href', 'lowsrc', 'src', 'action', 'background', 'codebase', 'dynsrc', 'href', 'lowsrc', 'src',
); );


/** /**
* List of dangerous CSS keywords * List of dangerous CSS keywords
Expand All @@ -195,18 +195,18 @@ class HTML_Safe
* *
* @var array * @var array
*/ */
var $cssKeywords = array( public $cssKeywords = array(
'absolute', 'behavior', 'behaviour', 'content', 'expression', 'absolute', 'behavior', 'behaviour', 'content', 'expression',
'fixed', 'include-source', 'moz-binding', 'fixed', 'include-source', 'moz-binding',
); );


/** /**
* List of tags that can have no "closing tag" * List of tags that can have no "closing tag"
* *
* @var array * @var array
* @deprecated XHTML does not allow such tags * @deprecated XHTML does not allow such tags
*/ */
var $noClose = array(); public $noClose = array();


/** /**
* List of block-level tags that terminates paragraph * List of block-level tags that terminates paragraph
Expand All @@ -215,51 +215,51 @@ class HTML_Safe
* *
* @var array * @var array
*/ */
var $closeParagraph = array( public $closeParagraph = array(
'address', 'blockquote', 'center', 'dd', 'dir', 'div', 'address', 'blockquote', 'center', 'dd', 'dir', 'div',
'dl', 'dt', 'h1', 'h2', 'h3', 'h4', 'dl', 'dt', 'h1', 'h2', 'h3', 'h4',
'h5', 'h6', 'hr', 'isindex', 'listing', 'marquee', 'h5', 'h6', 'hr', 'isindex', 'listing', 'marquee',
'menu', 'multicol', 'ol', 'p', 'plaintext', 'pre', 'menu', 'multicol', 'ol', 'p', 'plaintext', 'pre',
'table', 'ul', 'xmp', 'table', 'ul', 'xmp',
); );


/** /**
* List of table tags, all table tags outside a table will be removed * List of table tags, all table tags outside a table will be removed
* *
* @var array * @var array
*/ */
var $tableTags = array( public $tableTags = array(
'caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th', 'caption', 'col', 'colgroup', 'tbody', 'td', 'tfoot', 'th',
'thead', 'tr', 'thead', 'tr',
); );


/** /**
* List of list tags * List of list tags
* *
* @var array * @var array
*/ */
var $listTags = array('dir', 'menu', 'ol', 'ul', 'dl', ); public $listTags = array('dir', 'menu', 'ol', 'ul', 'dl', );


/** /**
* List of dangerous attributes * List of dangerous attributes
* *
* @var array * @var array
*/ */
var $attributes = array('dynsrc', 'id', 'name', ); public $attributes = array('dynsrc', 'id', 'name', );


/** /**
* List of allowed "namespaced" attributes * List of allowed "namespaced" attributes
* *
* @var array * @var array
*/ */
var $attributesNS = array('xml:lang', ); public $attributesNS = array('xml:lang', );


/** /**
* Constructs class * Constructs class
* *
* @access public * @access public
*/ */
function HTML_Safe() public function __construct()
{ {
//making regular expressions based on Proto & CSS arrays //making regular expressions based on Proto & CSS arrays
foreach ($this->blackProtocols as $proto) { foreach ($this->blackProtocols as $proto) {
Expand Down Expand Up @@ -555,7 +555,7 @@ public function setAllowTags($tags = array())
* *
* @return string Processed (X)HTML document * @return string Processed (X)HTML document
*/ */
function getXHTML () public function getXHTML()
{ {
while ($tag = array_pop($this->_stack)) { while ($tag = array_pop($this->_stack)) {
$this->_closeTag($tag); $this->_closeTag($tag);
Expand All @@ -569,7 +569,7 @@ function getXHTML ()
* *
* @return boolean * @return boolean
*/ */
function clear() public function clear()
{ {
$this->_xhtml = ''; $this->_xhtml = '';
return true; return true;
Expand All @@ -582,7 +582,7 @@ function clear()
* *
* @return string Processed (X)HTML document * @return string Processed (X)HTML document
*/ */
function parse($doc) public function parse($doc)
{ {


// Save all '<' symbols // Save all '<' symbols
Expand Down

0 comments on commit b290a22

Please sign in to comment.