includes/Sanitizer.php File Reference

XHTML sanitizer for MediaWiki. More...

Go to the source code of this file.

Classes

class  Sanitizer
 XHTML sanitizer for MediaWiki. More...

Enumerations

enum  MW_CHAR_REFS_REGEX
 Regular expression to match various types of character references in Sanitizer::normalizeCharReferences and Sanitizer::decodeCharReferences. More...
enum  MW_ATTRIBS_REGEX
enum  MW_EVIL_URI_PATTERN
 Regular expression to match URIs that could trigger script execution. More...
enum  MW_XMLNS_ATTRIBUTE_PATTRN
 Regular expression to match namespace attributes. More...

Variables

 $attrib = '[A-Za-z0-9]'
 Regular expression to match HTML/XML attribute pairs within a tag.
 $space = '[\x09\x0a\x0d\x20]'
global $wgHtmlEntities
 List of all named character entities defined in HTML 4.01 http://www.w3.org/TR/html4/sgml/entities.html.
global $wgHtmlEntityAliases
 Character entity aliases accepted by MediaWiki.


Detailed Description

XHTML sanitizer for MediaWiki.

Copyright (C) 2002-2005 Brion Vibber <brion@pobox.com> et al http://www.mediawiki.org/

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file Sanitizer.php.


Enumeration Type Documentation

Definition at line 44 of file Sanitizer.php.

Regular expression to match various types of character references in Sanitizer::normalizeCharReferences and Sanitizer::decodeCharReferences.

Definition at line 31 of file Sanitizer.php.

Regular expression to match URIs that could trigger script execution.

Definition at line 60 of file Sanitizer.php.

Regular expression to match namespace attributes.

Definition at line 65 of file Sanitizer.php.


Variable Documentation

$attrib = '[A-Za-z0-9]'

Regular expression to match HTML/XML attribute pairs within a tag.

Allows some... latitude. Used in Sanitizer::fixTagAttributes and Sanitizer::decodeTagAttributes

Definition at line 42 of file Sanitizer.php.

Referenced by UploadBase::checkSvgScriptCallback(), and Html::dropDefaults().

$space = '[\x09\x0a\x0d\x20]'

Definition at line 43 of file Sanitizer.php.

Referenced by Profiler::getCallTreeLine().

$wgHtmlEntities

List of all named character entities defined in HTML 4.01 http://www.w3.org/TR/html4/sgml/entities.html.

Access:
private

Definition at line 72 of file Sanitizer.php.

$wgHtmlEntityAliases

Initial value:

 array(
        'רלמ' => 'rlm',
        'رلم' => 'rlm',
)
Character entity aliases accepted by MediaWiki.

Definition at line 330 of file Sanitizer.php.


Generated on Sat Apr 30 22:57:25 2011 for MediaWiki by  doxygen 1.5.9