MediaWiki  1.32.5
RemexStripTagHandler Class Reference
Inheritance diagram for RemexStripTagHandler:
Collaboration diagram for RemexStripTagHandler:

Public Member Functions

 characters ( $text, $start, $length, $sourceStart, $sourceLength)
 
 comment ( $text, $sourceStart, $sourceLength)
 
 doctype ( $name, $public, $system, $quirks, $sourceStart, $sourceLength)
 
 endDocument ( $pos)
 
 endTag ( $name, $sourceStart, $sourceLength)
 
 error ( $text, $pos)
 
 getResult ()
 
 startDocument (Tokenizer $t, $fns, $fn)
 
 startTag ( $name, Attributes $attrs, $selfClose, $sourceStart, $sourceLength)
 

Private Member Functions

 isBlockLevelTag ( $tagName)
 Detect block level tags. More...
 

Private Attributes

 $text = ''
 

Static Private Attributes

static $BLOCK_LEVEL_TAGS
 

Detailed Description

Definition at line 10 of file RemexStripTagHandler.php.

Member Function Documentation

◆ characters()

RemexStripTagHandler::characters (   $text,
  $start,
  $length,
  $sourceStart,
  $sourceLength 
)

Definition at line 25 of file RemexStripTagHandler.php.

References $text, and text.

◆ comment()

RemexStripTagHandler::comment (   $text,
  $sourceStart,
  $sourceLength 
)

Definition at line 45 of file RemexStripTagHandler.php.

◆ doctype()

RemexStripTagHandler::doctype (   $name,
  $public,
  $system,
  $quirks,
  $sourceStart,
  $sourceLength 
)

Definition at line 42 of file RemexStripTagHandler.php.

◆ endDocument()

RemexStripTagHandler::endDocument (   $pos)

Definition at line 19 of file RemexStripTagHandler.php.

◆ endTag()

RemexStripTagHandler::endTag (   $name,
  $sourceStart,
  $sourceLength 
)

Definition at line 35 of file RemexStripTagHandler.php.

References $name, isBlockLevelTag(), and text.

◆ error()

RemexStripTagHandler::error (   $text,
  $pos 
)

Definition at line 22 of file RemexStripTagHandler.php.

◆ getResult()

RemexStripTagHandler::getResult ( )

Definition at line 12 of file RemexStripTagHandler.php.

References $text.

◆ isBlockLevelTag()

RemexStripTagHandler::isBlockLevelTag (   $tagName)
private

Detect block level tags.

Of course css can make anything a block level tag, but this is still better than nothing.

Parameters
string$tagNameHTML tag name
Returns
bool True when tag is an html block level element

Definition at line 103 of file RemexStripTagHandler.php.

Referenced by endTag(), and startTag().

◆ startDocument()

RemexStripTagHandler::startDocument ( Tokenizer  $t,
  $fns,
  $fn 
)

Definition at line 16 of file RemexStripTagHandler.php.

◆ startTag()

RemexStripTagHandler::startTag (   $name,
Attributes  $attrs,
  $selfClose,
  $sourceStart,
  $sourceLength 
)

Definition at line 28 of file RemexStripTagHandler.php.

References $name, isBlockLevelTag(), and text.

Member Data Documentation

◆ $BLOCK_LEVEL_TAGS

RemexStripTagHandler::$BLOCK_LEVEL_TAGS
staticprivate

Definition at line 55 of file RemexStripTagHandler.php.

◆ $text

RemexStripTagHandler::$text = ''
private

Definition at line 11 of file RemexStripTagHandler.php.

Referenced by characters(), and getResult().


The documentation for this class was generated from the following file: