MediaWiki  1.34.4
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 29 of file RemexStripTagHandler.php.

References $text.

◆ comment()

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

Definition at line 53 of file RemexStripTagHandler.php.

◆ doctype()

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

Definition at line 49 of file RemexStripTagHandler.php.

◆ endDocument()

RemexStripTagHandler::endDocument (   $pos)

Definition at line 21 of file RemexStripTagHandler.php.

◆ endTag()

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

Definition at line 41 of file RemexStripTagHandler.php.

References isBlockLevelTag().

◆ error()

RemexStripTagHandler::error (   $text,
  $pos 
)

Definition at line 25 of file RemexStripTagHandler.php.

◆ getResult()

RemexStripTagHandler::getResult ( )

Definition at line 13 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 113 of file RemexStripTagHandler.php.

Referenced by endTag(), and startTag().

◆ startDocument()

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

Definition at line 17 of file RemexStripTagHandler.php.

◆ startTag()

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

Definition at line 33 of file RemexStripTagHandler.php.

References isBlockLevelTag().

Member Data Documentation

◆ $BLOCK_LEVEL_TAGS

RemexStripTagHandler::$BLOCK_LEVEL_TAGS
staticprivate

Definition at line 63 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: