TYPO3 API  SVNRelease
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes
t3lib_parsehtml Class Reference
Inheritance diagram for t3lib_parsehtml:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 splitIntoBlock ($tag, $content, $eliminateExtraEndTags=0)
 splitIntoBlockRecursiveProc ($tag, $content, &$procObj, $callBackContent, $callBackTags, $level=0)
 splitTags ($tag, $content)
 getAllParts ($parts, $tag_parts=1, $include_tag=1)
 removeFirstAndLastTag ($str)
 getFirstTag ($str)
 getFirstTagName ($str, $preserveCase=FALSE)
 get_tag_attributes ($tag, $deHSC=0)
 split_tag_attributes ($tag)
 checkTagTypeCounts ($content, $blockTags= 'a, b, blockquote, body, div, em, font, form, h1, h2, h3, h4, h5, h6, i, li, map, ol, option, p, pre, select, span, strong, table, td, textarea, tr, u, ul', $soloTags= 'br, hr, img, input, area')
 HTMLcleaner ($content, $tags=array(), $keepAll=0, $hSC=0, $addConfig=array())
 bidir_htmlspecialchars ($value, $dir)
 prefixResourcePath ($main_prefix, $content, $alternatives=array(), $suffix= '')
 prefixRelPath ($prefix, $srcVal, $suffix= '')
 cleanFontTags ($value, $keepFace=0, $keepSize=0, $keepColor=0)
 mapTags ($value, $tags=array(), $ltChar= '<', $ltChar2= '<')
 unprotectTags ($content, $tagList= '')
 stripTagsExcept ($value, $tagList)
 caseShift ($str, $flag, $cacheKey= '')
 compileTagAttribs ($tagAttrib, $meta=array(), $xhtmlClean=0)
 get_tag_attributes_classic ($tag, $deHSC=0)
 indentLines ($content, $number=1, $indentChar=TAB)
 HTMLparserConfig ($TSconfig, $keepTags=array())
 XHTML_clean ($content)
 processTag ($value, $conf, $endTag, $protected=0)
 processContent ($value, $dir, $conf)

Static Public Member Functions

static getSubpart ($content, $marker)
static substituteSubpart ($content, $marker, $subpartContent, $recursive=1, $keepMarker=0)
static substituteSubpartArray ($content, array $subpartsContent)
static substituteMarker ($content, $marker, $markContent)
static substituteMarkerArray ($content, $markContentArray, $wrap= '', $uppercase=0, $deleteUnused=0)

Public Attributes

const VOID_ELEMENTS = 'area|base|br|col|command|embed|hr|img|input|keygen|meta|param|source|track|wbr'

Protected Attributes

 $caseShift_cache = array()

Detailed Description

Definition at line 88 of file class.t3lib_parsehtml.php.


Member Function Documentation

t3lib_parsehtml::bidir_htmlspecialchars ( value,
dir 
)

Converts htmlspecialchars forth ($dir=1) AND back ($dir=-1)

Parameters:
stringInput value
integerDirection: forth ($dir=1, dir=2 for preserving entities) AND back ($dir=-1)
Returns:
string Output value

Definition at line 977 of file class.t3lib_parsehtml.php.

References $value, and t3lib_div\deHSCentities().

Referenced by processContent(), and processTag().

t3lib_parsehtml::caseShift ( str,
flag,
cacheKey = '' 
)

Internal function for case shifting of a string or whole array

Parameters:
mixedInput string/array
booleanIf $str is a string AND this boolean(caseSensitive) is false, the string is returned in uppercase
stringKey string used for internal caching of the results. Could be an MD5 hash of the serialized version of the input $str if that is an array.
Returns:
string Output string, processed private

Definition at line 1228 of file class.t3lib_parsehtml.php.

Referenced by HTMLcleaner().

t3lib_parsehtml::checkTagTypeCounts ( content,
blockTags = 'a,
,
blockquote  ,
body  ,
div  ,
em  ,
font  ,
form  ,
h1  ,
h2  ,
h3  ,
h4  ,
h5  ,
h6  ,
,
li  ,
map  ,
ol  ,
option  ,
,
pre  ,
select  ,
span  ,
strong  ,
table  ,
td  ,
textarea  ,
tr  ,
,
ul'  ,
soloTags = 'br,
hr  ,
img  ,
input  ,
area'   
)

Checks whether block/solo tags are found in the correct amounts in HTML content Block tags are tags which are required to have an equal amount of start and end tags, eg. "<table>...</table>" Solo tags are tags which are required to have ONLY start tags (possibly with an XHTML ending like ".../>") NOTICE: Correct XHTML might actually fail since "<br></br>" is allowed as well as "<br/>". However only the LATTER is accepted by this function (with "br" in the "solo-tag" list), the first example will result in a warning. NOTICE: Correct XHTML might actually fail since "<p/>" is allowed as well as "<p></p>". However only the LATTER is accepted by this function (with "p" in the "block-tag" list), the first example will result in an ERROR! NOTICE: Correct HTML version "something" allows eg.

and to be NON-ended (implicitly ended by other tags). However this is NOT accepted by this function (with "p" and "li" in the block-tag list) and it will result in an ERROR!

Parameters:
stringHTML content to analyze
stringTag names for block tags (eg. table or div or p) in lowercase, commalist (eg. "table,div,p")
stringTag names for solo tags (eg. img, br or input) in lowercase, commalist ("img,br,input")
Returns:
array Analyse data.

Definition at line 615 of file class.t3lib_parsehtml.php.

References $content.

t3lib_parsehtml::cleanFontTags ( value,
keepFace = 0,
keepSize = 0,
keepColor = 0 
)

Cleans up the input $value for fonttags. If keepFace,-Size and -Color is set then font-tags with an allowed property is kept. Else deleted.

Parameters:
stringHTML content with font-tags inside to clean up.
booleanIf set, keep "face" attribute
booleanIf set, keep "size" attribute
booleanIf set, keep "color" attribute
Returns:
string Processed HTML content

Definition at line 1115 of file class.t3lib_parsehtml.php.

References $value, get_tag_attributes_classic(), getFirstTag(), removeFirstAndLastTag(), and splitIntoBlock().

Referenced by t3lib_parsehtml_proc\TS_transform_db().

t3lib_parsehtml::compileTagAttribs ( tagAttrib,
meta = array(),
xhtmlClean = 0 
)

Compiling an array with tag attributes into a string

Parameters:
arrayTag attributes
arrayMeta information about these attributes (like if they were quoted)
booleanIf set, then the attribute names will be set in lower case, value quotes in double-quotes and the value will be htmlspecialchar()'ed
Returns:
string Imploded attributes, eg: 'attribute="value" attrib2="value2"' private

Definition at line 1259 of file class.t3lib_parsehtml.php.

References t3lib_div\testInt().

Referenced by t3lib_parsehtml_proc\divideIntoLines(), HTMLcleaner(), and prefixResourcePath().

t3lib_parsehtml::get_tag_attributes ( tag,
deHSC = 0 
)

Returns an array with all attributes as keys. Attributes are only lowercase a-z If a attribute is empty (shorthand), then the value for the key is empty. You can check if it existed with isset()

Parameters:
stringTag: $tag is either a whole tag (eg '<TAG option="" attrib="VALUE">') or the parameterlist (ex ' OPTION ATTRIB=VALUE>')
booleanIf set, the attribute values are de-htmlspecialchar'ed. Should actually always be set!
Returns:
array array(Tag attributes,Attribute meta-data)

Definition at line 536 of file class.t3lib_parsehtml.php.

References t3lib_div\htmlspecialchars_decode(), and split_tag_attributes().

Referenced by t3lib_parsehtml_proc\divideIntoLines(), get_tag_attributes_classic(), HTMLcleaner(), prefixResourcePath(), and processTag().

t3lib_parsehtml::get_tag_attributes_classic ( tag,
deHSC = 0 
)
t3lib_parsehtml::getAllParts ( parts,
tag_parts = 1,
include_tag = 1 
)

Returns an array with either tag or non-tag content of the result from ->splitIntoBlock()/->splitTags()

Parameters:
arrayParts generated by ->splitIntoBlock() or >splitTags()
booleanWhether to return the tag-parts (default,true) or what was outside the tags.
booleanWhether to include the tags in the tag-parts (most useful for input made by ->splitIntoBlock())
Returns:
array Tag-parts/Non-tag-parts depending on input argument settings
See also:
splitIntoBlock(), splitTags()

Definition at line 467 of file class.t3lib_parsehtml.php.

References removeFirstAndLastTag().

Referenced by t3lib_parsehtml_proc\removeTables(), and t3lib_parsehtml_proc\TS_transform_db().

t3lib_parsehtml::getFirstTag ( str)
t3lib_parsehtml::getFirstTagName ( str,
preserveCase = FALSE 
)

Returns the NAME of the first tag in $str

Parameters:
stringHTML tag (The element name MUST be separated from the attributes by a space character! Just *whitespace* will not do)
booleanIf set, then the tag is NOT converted to uppercase by case is preserved.
Returns:
string Tag name in upper case
See also:
getFirstTag()

Definition at line 517 of file class.t3lib_parsehtml.php.

Referenced by t3lib_parsehtml_proc\divideIntoLines(), t3lib_parsehtml_proc\internalizeFontTags(), prefixResourcePath(), splitIntoBlockRecursiveProc(), t3lib_parsehtml_proc\TS_preserve_db(), t3lib_parsehtml_proc\TS_transform_db(), and t3lib_parsehtml_proc\TS_transform_rte().

static t3lib_parsehtml::getSubpart ( content,
marker 
) [static]
t3lib_parsehtml::HTMLcleaner ( content,
tags = array(),
keepAll = 0,
hSC = 0,
addConfig = array() 
)

Function that can clean up HTML content according to configuration given in the $tags array.

Initializing the $tags array to allow a list of tags (in this case ,,<U> and ), set it like this: $tags = array_flip(explode(',','b,a,i,u')) If the value of the $tags[$tagname] entry is an array, advanced processing of the tags is initialized. These are the options:

$tags[$tagname] = Array( 'overrideAttribs' => '' If set, this string is preset as the attributes of the tag 'allowedAttribs' => '0' (zero) = no attributes allowed, '[commalist of attributes]' = only allowed attributes. If blank, all attributes are allowed. 'fixAttrib' => Array( '[attribute name]' => Array ( 'set' => Force the attribute value to this value. 'unset' => Boolean: If set, the attribute is unset. 'default' => If no attribute exists by this name, this value is set as default value (if this value is not blank) 'always' => Boolean. If set, the attribute is always processed. Normally an attribute is processed only if it exists 'trim,intval,lower,upper' => All booleans. If any of these keys are set, the value is passed through the respective PHP-functions. 'range' => Array ('[low limit]','[high limit, optional]') Setting integer range. 'list' => Array ('[value1/default]','[value2]','[value3]') Attribute must be in this list. If not, the value is set to the first element. 'removeIfFalse' => Boolean/'blank'. If set, then the attribute is removed if it is 'false'. If this value is set to 'blank' then the value must be a blank string (that means a 'zero' value will not be removed) 'removeIfEquals' => [value] If the attribute value matches the value set here, then it is removed. 'casesensitiveComp' => 1 If set, then the removeIfEquals and list comparisons will be case sensitive. Otherwise not. ) ), 'protect' => '', Boolean. If set, the tag <> is converted to < and > 'remap' => '', String. If set, the tagname is remapped to this tagname 'rmTagIfNoAttrib' => '', Boolean. If set, then the tag is removed if no attributes happend to be there. 'nesting' => '', Boolean/'global'. If set true, then this tag must have starting and ending tags in the correct order. Any tags not in this order will be discarded. Thus '' will be converted to ''. Is the value 'global' then true nesting in relation to other tags marked for 'global' nesting control is preserved. This means that if and are set for global nesting then this string '' is converted to '' )

Parameters:
string$content,;is the HTML-content being processed. This is also the result being returned.
array$tags,;is an array where each key is a tagname in lowercase. Only tags present as keys in this array are preserved. The value of the key can be an array with a vast number of options to configure.
string$keepAll,;boolean/'protect', if set, then all tags are kept regardless of tags present as keys in $tags-array. If 'protect' then the preserved tags have their <> converted to < and >
integer$hSC,;Values -1,0,1,2: Set to zero= disabled, set to 1 then the content BETWEEN tags is htmlspecialchar()'ed, set to -1 its the opposite and set to 2 the content will be HSC'ed BUT with preservation for real entities (eg. "&amp;" or "&#234;")
arrayConfiguration array send along as $conf to the internal functions ->processContent() and ->processTag()
Returns:
string Processed HTML content

Definition at line 702 of file class.t3lib_parsehtml.php.

References $content, t3lib_div\callUserFunction(), caseShift(), compileTagAttribs(), get_tag_attributes(), t3lib_div\getIndpEnv(), t3lib_div\intInRange(), t3lib_div\isFirstPartOfStr(), processContent(), processTag(), and t3lib_div\trimExplode().

Referenced by t3lib_parsehtml_proc\HTMLcleaner_db(), t3lib_parsehtml_proc\RTE_transform(), t3lib_parsehtml_proc\setDivTags(), and XHTML_clean().

t3lib_parsehtml::HTMLparserConfig ( TSconfig,
keepTags = array() 
)

Converts TSconfig into an array for the HTMLcleaner function.

Parameters:
arrayTSconfig for HTMLcleaner
arrayArray of tags to keep (?)
Returns:
array private

Definition at line 1317 of file class.t3lib_parsehtml.php.

References t3lib_div\trimExplode().

Referenced by t3lib_parsehtml_proc\getKeepTags(), and t3lib_parsehtml_proc\RTE_transform().

t3lib_parsehtml::indentLines ( content,
number = 1,
indentChar = TAB 
)

Indents input content with $number instances of $indentChar

Parameters:
stringContent string, multiple lines.
integerNumber of indents
stringIndent character/string
Returns:
string Indented code (typ. HTML)

Definition at line 1300 of file class.t3lib_parsehtml.php.

References $content.

t3lib_parsehtml::mapTags ( value,
tags = array(),
ltChar = '<',
ltChar2 = '<' 
)

This is used to map certain tag-names into other names.

Parameters:
stringHTML content
arrayArray with tag key=>value pairs where key is from-tag and value is to-tag
stringAlternative less-than char to search for (search regex string)
stringAlternative less-than char to replace with (replace regex string)
Returns:
string Processed HTML content

Definition at line 1151 of file class.t3lib_parsehtml.php.

References $value.

Referenced by t3lib_parsehtml_proc\defaultTStagMapping(), and stripTagsExcept().

t3lib_parsehtml::prefixRelPath ( prefix,
srcVal,
suffix = '' 
)

Internal sub-function for ->prefixResourcePath()

Parameters:
stringPrefix string
stringRelative path/URL
stringSuffix string
Returns:
string Output path, prefixed if no scheme in input string private

Definition at line 1092 of file class.t3lib_parsehtml.php.

Referenced by prefixResourcePath().

t3lib_parsehtml::prefixResourcePath ( main_prefix,
content,
alternatives = array(),
suffix = '' 
)

Prefixes the relative paths of hrefs/src/action in the tags [td,table,body,img,input,form,link,script,a] in the $content with the $main_prefix or and alternative given by $alternatives

Parameters:
stringPrefix string
stringHTML content
arrayArray with alternative prefixes for certain of the tags. key=>value pairs where the keys are the tag element names in uppercase
stringSuffix string (put after the resource).
Returns:
string Processed HTML content

Definition at line 1000 of file class.t3lib_parsehtml.php.

References $content, compileTagAttribs(), get_tag_attributes(), getFirstTagName(), prefixRelPath(), splitIntoBlock(), and splitTags().

t3lib_parsehtml::processContent ( value,
dir,
conf 
)

Processing content between tags for HTML_cleaner

Parameters:
stringThe value
integerDirection, either -1 or +1. 0 (zero) means no change to input value.
mixedNot used, ignore.
Returns:
string The processed value. private

Reimplemented in local_t3lib_parsehtml.

Definition at line 1527 of file class.t3lib_parsehtml.php.

References $value, and bidir_htmlspecialchars().

Referenced by HTMLcleaner().

t3lib_parsehtml::processTag ( value,
conf,
endTag,
protected = 0 
)

Processing all tags themselves (Some additions by Sacha Vorbeck)

Parameters:
stringTag to process
arrayConfiguration array passing instructions for processing. If count()==0, function will return value unprocessed. See source code for details
booleanIs endtag, then set this.
booleanIf set, just return value straight away
Returns:
string Processed value. private

Definition at line 1476 of file class.t3lib_parsehtml.php.

References $value, bidir_htmlspecialchars(), get_tag_attributes(), and t3lib_div\inList().

Referenced by HTMLcleaner().

t3lib_parsehtml::removeFirstAndLastTag ( str)
t3lib_parsehtml::split_tag_attributes ( tag)

Returns an array with the 'components' from an attribute list. The result is normally analyzed by get_tag_attributes Removes tag-name if found

Parameters:
stringThe tag or attributes
Returns:
array private
See also:
t3lib_div::split_tag_attributes()

Definition at line 577 of file class.t3lib_parsehtml.php.

References $value.

Referenced by get_tag_attributes().

t3lib_parsehtml::splitIntoBlock ( tag,
content,
eliminateExtraEndTags = 0 
)

Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.

Parameters:
stringList of tags, comma separated.
stringHTML-content
booleanIf set, excessive end tags are ignored - you should probably set this in most cases.
Returns:
array Even numbers in the array are outside the blocks, Odd numbers are block-content.
See also:
splitTags(), getAllParts(), removeFirstAndLastTag()

Definition at line 332 of file class.t3lib_parsehtml.php.

References $content, and t3lib_div\trimExplode().

Referenced by cleanFontTags(), t3lib_parsehtml_proc\divideIntoLines(), t3lib_parsehtml_proc\internalizeFontTags(), prefixResourcePath(), t3lib_parsehtml_proc\removeTables(), splitIntoBlockRecursiveProc(), t3lib_parsehtml_proc\transformStyledATags(), t3lib_parsehtml_proc\TS_AtagToAbs(), t3lib_parsehtml_proc\TS_links_db(), t3lib_parsehtml_proc\TS_links_rte(), t3lib_parsehtml_proc\TS_preserve_db(), t3lib_parsehtml_proc\TS_preserve_rte(), t3lib_parsehtml_proc\TS_reglinks(), t3lib_parsehtml_proc\TS_transform_db(), and t3lib_parsehtml_proc\TS_transform_rte().

t3lib_parsehtml::splitIntoBlockRecursiveProc ( tag,
content,
&$  procObj,
callBackContent,
callBackTags,
level = 0 
)

Splitting content into blocks *recursively* and processing tags/content with call back functions.

Parameters:
stringTag list, see splitIntoBlock()
stringContent, see splitIntoBlock()
objectObject where call back methods are.
stringName of call back method for content; "function callBackContent($str,$level)"
stringName of call back method for tags; "function callBackTags($tags,$level)"
integerIndent level
Returns:
string Processed content
See also:
splitIntoBlock()

Definition at line 393 of file class.t3lib_parsehtml.php.

References $content, getFirstTag(), getFirstTagName(), removeFirstAndLastTag(), and splitIntoBlock().

t3lib_parsehtml::splitTags ( tag,
content 
)

Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.

Parameters:
stringList of tags
stringHTML-content
Returns:
array Even numbers in the array are outside the blocks, Odd numbers are block-content.
See also:
splitIntoBlock(), getAllParts(), removeFirstAndLastTag()

Definition at line 433 of file class.t3lib_parsehtml.php.

References $content, and t3lib_div\trimExplode().

Referenced by prefixResourcePath(), t3lib_parsehtml_proc\TS_images_db(), and t3lib_parsehtml_proc\TS_images_rte().

t3lib_parsehtml::stripTagsExcept ( value,
tagList 
)

Strips tags except the tags in the list, $tagList OBSOLETE - use PHP function strip_tags()

Parameters:
stringValue to process
stringList of tags
Returns:
string Output value

Definition at line 1205 of file class.t3lib_parsehtml.php.

References $value, mapTags(), and t3lib_div\trimExplode().

static t3lib_parsehtml::substituteMarker ( content,
marker,
markContent 
) [static]

Substitutes a marker string in the input content (by a simple str_replace())

Parameters:
stringThe content stream, typically HTML template content.
stringThe marker string, typically on the form "###[the marker string]###"
mixedThe content to insert instead of the marker string found.
Returns:
string The processed HTML content string.
See also:
substituteSubpart()

Definition at line 258 of file class.t3lib_parsehtml.php.

References $content.

Referenced by template\getDocHeaderButtons(), and SC_index\makeLoginNews().

static t3lib_parsehtml::substituteMarkerArray ( content,
markContentArray,
wrap = '',
uppercase = 0,
deleteUnused = 0 
) [static]

Traverses the input $markContentArray array and for each key the marker by the same name (possibly wrapped and in upper case) will be substituted with the keys value in the array. This is very useful if you have a data-record to substitute in some content. In particular when you use the $wrap and $uppercase values to pre-process the markers. Eg. a key name like "myfield" could effectively be represented by the marker "###MYFIELD###" if the wrap value was "###|###" and the $uppercase boolean true.

Parameters:
stringThe content stream, typically HTML template content.
arrayThe array of key/value pairs being marker/content values used in the substitution. For each element in this array the function will substitute a marker in the content stream with the content.
stringA wrap value - [part 1] | [part 2] - for the markers before substitution
booleanIf set, all marker string substitution is done with upper-case markers.
booleanIf set, all unused marker are deleted.
Returns:
string The processed output stream
See also:
substituteMarker(), substituteMarkerInObject(), TEMPLATE()

Definition at line 281 of file class.t3lib_parsehtml.php.

References $content, and t3lib_div\trimExplode().

Referenced by tx_install\alterPasswordForm(), tx_linkvalidator_tasks_Validator\buildMail(), tx_install\checkImageMagick(), tx_install\checkTheDatabase(), tx_install\cleanupManager(), tx_dbal_installtool\createConnectionForm(), tx_install\displayFieldComp(), tx_install\displayFields(), tx_install\displaySuggestions(), tx_install\displayTwinImage(), t3lib_spritemanager_SpriteGenerator\generateCSS(), tx_install\generateUpdateDatabaseForm_checkboxes(), template\getDocHeaderButtons(), tx_install\getUpdateDbFormWrap(), tx_install\imagemenu(), tx_install\init(), tx_install\loginForm(), SC_index\makeLoginForm(), SC_index\makeLoginNews(), SC_index\makeLogoutForm(), tx_install\menu(), template\moduleBody(), tx_install\outputErrorAndExit(), tx_install\outputWrapper(), tx_install\printAll(), tx_install\printSection(), t3lib_PageRenderer\render(), tx_install\setupGeneral(), tx_install\stepHeader(), tx_install\stepOutput(), tx_install\updateWizard_parts(), tx_install\viewArray(), SC_index\wrapLoginForm(), and tx_install\writeToLocalconf_control().

static t3lib_parsehtml::substituteSubpart ( content,
marker,
subpartContent,
recursive = 1,
keepMarker = 0 
) [static]

Substitutes a subpart in $content with the content of $subpartContent.

Parameters:
stringContent with subpart wrapped in fx. "###CONTENT_PART###" inside.
stringMarker string, eg. "###CONTENT_PART###"
arrayIf $subpartContent happens to be an array, it's [0] and [1] elements are wrapped around the content of the subpart (fetched by getSubpart())
booleanIf $recursive is set, the function calls itself with the content set to the remaining part of the content after the second marker. This means that proceding subparts are ALSO substituted!
booleanIf set, the marker around the subpart is not removed, but kept in the output
Returns:
string Processed input content

Definition at line 148 of file class.t3lib_parsehtml.php.

References $content.

Referenced by tx_install\checkImageMagick(), tx_install\checkTheDatabase(), tx_install\cleanupManager(), tx_dbal_installtool\createConnectionForm(), tx_install\displayFieldComp(), tx_install\displayFields(), tx_install\displaySuggestions(), tx_install\displayTwinImage(), tx_install\generateUpdateDatabaseForm_checkboxes(), template\getDocHeaderButtons(), tx_install\imagemenu(), tx_install\loginForm(), SC_index\makeLoginForm(), SC_index\makeLoginNews(), SC_index\makeLogoutForm(), tx_install\menu(), template\moduleBody(), tx_install\outputWrapper(), tx_install\printAll(), tx_install\printSection(), tx_install\setupGeneral(), tx_install\stepHeader(), tx_install\stepOutput(), substituteSubpartArray(), tx_install\updateWizard_parts(), tx_install\viewArray(), and tx_install\writeToLocalconf_control().

static t3lib_parsehtml::substituteSubpartArray ( content,
array $  subpartsContent 
) [static]

Substitues multiple subparts at once

Parameters:
stringThe content stream, typically HTML template content.
arrayThe array of key/value pairs being subpart/content values used in the substitution. For each element in this array the function will substitute a subpart in the content stream with the content.
Returns:
string The processed HTML content string.

Definition at line 235 of file class.t3lib_parsehtml.php.

References $content, and substituteSubpart().

t3lib_parsehtml::unprotectTags ( content,
tagList = '' 
)

This converts htmlspecialchar()'ed tags (from $tagList) back to real tags. Eg. '<strong&gt' would be converted back to '' if found in $tagList

Parameters:
stringHTML content
stringTag list, separated by comma. Lowercase!
Returns:
string Processed HTML content

Definition at line 1166 of file class.t3lib_parsehtml.php.

References $content, and t3lib_div\trimExplode().

t3lib_parsehtml::XHTML_clean ( content)

Tries to convert the content to be XHTML compliant and other stuff like that. STILL EXPERIMENTAL. See comments below.

What it does NOT do (yet) according to XHTML specs.:

  • Wellformedness: Nesting is NOT checked
  • name/id attribute issue is not observed at this point.
  • Certain nesting of elements not allowed. Most interesting,
     cannot contain img, big,small,sub,sup ...
  • Wrapping scripts and style element contents in CDATA - or alternatively they should have entitites converted.
  • Setting charsets may put some special requirements on both XML declaration/ meta-http-equiv. (C.9)
  • UTF-8 encoding is in fact expected by XML!!
  • stylesheet element and attribute names are NOT converted to lowercase
  • ampersands (and entities in general I think) MUST be converted to an entity reference! (). This may mean further conversion of non-tag content before output to page. May be related to the charset issue as a whole.
  • Minimized values not allowed: Must do this: selected="selected"
			 What it does at this point:

  • All tags (frame,base,meta,link + img,br,hr,area,input) is ended with "/>" - others?
  • Lowercase for elements and attributes
  • All attributes in quotes
  • Add "alt" attribute to img-tags if it's not there already.
 
Parameters:
stringContent to clean up
Returns:
string Cleaned up content returned. private

Definition at line 1454 of file class.t3lib_parsehtml.php.

References $content, and HTMLcleaner().


Member Data Documentation

t3lib_parsehtml::$caseShift_cache = array() [protected]

Definition at line 90 of file class.t3lib_parsehtml.php.

const t3lib_parsehtml::VOID_ELEMENTS = 'area|base|br|col|command|embed|hr|img|input|keygen|meta|param|source|track|wbr'

Definition at line 92 of file class.t3lib_parsehtml.php.


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