Öffentliche Methoden | |
| init ($elRef='', $recPid=0) | |
| setRelPath ($path) | |
| evalWriteFile ($pArr, $currentRecord) | |
| RTE_transform ($value, $specConf, $direction='rte', $thisConfig=array()) | |
| TS_images_db ($value) | |
| TS_images_rte ($value) | |
| TS_reglinks ($value, $direction) | |
| TS_links_db ($value) | |
| TS_links_rte ($value) | |
| TS_preserve_db ($value) | |
| TS_preserve_rte ($value) | |
| TS_transform_db ($value, $css=FALSE) | |
| transformStyledATags ($value) | |
| TS_transform_rte ($value, $css=0) | |
| TS_strip_db ($value) | |
| getURL ($url) | |
| HTMLcleaner_db ($content, $tagList='') | |
| getKeepTags ($direction='rte', $tagList='') | |
| divideIntoLines ($value, $count=5, $returnArray=FALSE) | |
| setDivTags ($value, $dT='p') | |
| internalizeFontTags ($value) | |
| siteUrl () | |
| rteImageStorageDir () | |
| removeTables ($value, $breakChar='< br/>') | |
| defaultTStagMapping ($code, $direction='rte') | |
| getWHFromAttribs ($attribArray) | |
| urlInfoForLinkTags ($url) | |
| TS_AtagToAbs ($value, $dontSetRTEKEEP=FALSE) | |
| getSubpart ($content, $marker) | |
| substituteSubpart ($content, $marker, $subpartContent, $recursive=1, $keepMarker=0) | |
| substituteMarker ($content, $marker, $markContent) | |
| substituteMarkerArray ($content, $markContentArray, $wrap='', $uppercase=0, $deleteUnused=0) | |
| 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="\t") | |
| HTMLparserConfig ($TSconfig, $keepTags=array()) | |
| XHTML_clean ($content) | |
| processTag ($value, $conf, $endTag, $protected=0) | |
| processContent ($value, $dir, $conf) | |
Öffentliche Attribute | |
| $blockElementList = 'PRE,UL,OL,H1,H2,H3,H4,H5,H6,HR,ADDRESS,DL,DD' | |
| $recPid = 0 | |
| $elRef = '' | |
| $relPath = '' | |
| $relBackPath = '' | |
| $tsConfig = array() | |
| $procOptions = '' | |
| $TS_transform_db_safecounter = 100 | |
| $rte_p = '' | |
| $getKeepTags_cache = array() | |
| $allowedClasses = array() | |
| $preserveTags = '' | |
| $caseShift_cache = array() | |
| t3lib_parsehtml::bidir_htmlspecialchars | ( | $ | value, | |
| $ | dir | |||
| ) | [inherited] |
Converts htmlspecialchars forth ($dir=1) AND back ($dir=-1)
| string | Input value | |
| integer | Direction: forth ($dir=1, dir=2 for preserving entities) AND back ($dir=-1) |
| t3lib_parsehtml::caseShift | ( | $ | str, | |
| $ | flag, | |||
| $ | cacheKey = '' | |||
| ) | [inherited] |
Internal function for case shifting of a string or whole array
| mixed | Input string/array | |
| boolean | If $str is a string AND this boolean(caseSensitive) is false, the string is returned in uppercase | |
| string | Key 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. |
| t3lib_parsehtml::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' | ||||
| ) | [inherited] |
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!
| string | HTML content to analyze | |
| string | Tag names for block tags (eg. table or div or p) in lowercase, commalist (eg. "table,div,p") | |
| string | Tag names for solo tags (eg. img, br or input) in lowercase, commalist ("img,br,input") |
| t3lib_parsehtml::cleanFontTags | ( | $ | value, | |
| $ | keepFace = 0, |
|||
| $ | keepSize = 0, |
|||
| $ | keepColor = 0 | |||
| ) | [inherited] |
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.
| string | HTML content with font-tags inside to clean up. | |
| boolean | If set, keep "face" attribute | |
| boolean | If set, keep "size" attribute | |
| boolean | If set, keep "color" attribute |
| t3lib_parsehtml::compileTagAttribs | ( | $ | tagAttrib, | |
| $ | meta = array(), |
|||
| $ | xhtmlClean = 0 | |||
| ) | [inherited] |
Compiling an array with tag attributes into a string
| array | Tag attributes | |
| array | Meta information about these attributes (like if they were quoted) | |
| boolean | If set, then the attribute names will be set in lower case, value quotes in double-quotes and the value will be htmlspecialchar()'ed |
| t3lib_parsehtml_proc::defaultTStagMapping | ( | $ | code, | |
| $ | direction = 'rte' | |||
| ) |
Default tag mapping for TS
| string | Input code to process | |
| string | Direction To databsae (db) or from database to RTE (rte) |
| t3lib_parsehtml_proc::divideIntoLines | ( | $ | value, | |
| $ | count = 5, |
|||
| $ | returnArray = FALSE | |||
| ) |
This resolves the $value into parts based on
-sections and
-sections and
-tags. These are returned as lines separated by chr(10). This point is to resolve the HTML-code returned from RTE into ordinary lines so it's 'human-readable' The function ->setDivTags does the opposite. This function processes content to go into the database.
| string | Value to process. | |
| integer | Recursion brake. Decremented on each recursion down to zero. Default is 5 (which equals the allowed nesting levels of p/div tags). | |
| boolean | If true, an array with the lines is returned, otherwise a string of the processed input value. |
| t3lib_parsehtml_proc::evalWriteFile | ( | $ | pArr, | |
| $ | currentRecord | |||
| ) |
Evaluate the environment for editing a staticFileEdit file. Called for almost all fields being saved in the database. Is called without an instance of the object: t3lib_parsehtml_proc::evalWriteFile()
| array | Parameters for the current field as found in types-config | |
| array | Current record we are editing. |
| t3lib_parsehtml::get_tag_attributes | ( | $ | tag, | |
| $ | deHSC = 0 | |||
| ) | [inherited] |
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()
| string | Tag: $tag is either a whole tag (eg '<TAG option="" attrib="VALUE">') or the parameterlist (ex ' OPTION ATTRIB=VALUE>') | |
| boolean | If set, the attribute values are de-htmlspecialchar'ed. Should actually always be set! |
| t3lib_parsehtml::get_tag_attributes_classic | ( | $ | tag, | |
| $ | deHSC = 0 | |||
| ) | [inherited] |
Get tag attributes, the classic version (which had some limitations?)
| string | The tag | |
| boolean | De-htmlspecialchar flag. |
| t3lib_parsehtml::getAllParts | ( | $ | parts, | |
| $ | tag_parts = 1, |
|||
| $ | include_tag = 1 | |||
| ) | [inherited] |
Returns an array with either tag or non-tag content of the result from ->splitIntoBlock()/->splitTags()
| array | Parts generated by ->splitIntoBlock() or >splitTags() | |
| boolean | Whether to return the tag-parts (default,true) or what was outside the tags. | |
| boolean | Whether to include the tags in the tag-parts (most useful for input made by ->splitIntoBlock()) |
| t3lib_parsehtml::getFirstTag | ( | $ | str | ) | [inherited] |
Returns the first tag in $str Actually everything from the begining of the $str is returned, so you better make sure the tag is the first thing...
| string | HTML string with tags |
| t3lib_parsehtml::getFirstTagName | ( | $ | str, | |
| $ | preserveCase = FALSE | |||
| ) | [inherited] |
Returns the NAME of the first tag in $str
| string | HTML tag (The element name MUST be separated from the attributes by a space character! Just *whitespace* will not do) | |
| boolean | If set, then the tag is NOT converted to uppercase by case is preserved. |
| t3lib_parsehtml_proc::getKeepTags | ( | $ | direction = 'rte', |
|
| $ | tagList = '' | |||
| ) |
Creates an array of configuration for the HTMLcleaner function based on whether content go TO or FROM the Rich Text Editor ($direction) Unless "tagList" is given, the function will cache the configuration for next time processing goes on. (In this class that is the case only if we are processing a bulletlist)
| string | The direction of the content being processed by the output configuration; "db" (content going into the database FROM the rte) or "rte" (content going into the form) | |
| string | Comma list of tags to keep (overriding default which is to keep all + take notice of internal configuration) |
| t3lib_parsehtml::getSubpart | ( | $ | content, | |
| $ | marker | |||
| ) | [inherited] |
Returns the first subpart encapsulated in the marker, $marker (possibly present in $content as a HTML comment)
| string | Content with subpart wrapped in fx. "###CONTENT_PART###" inside. | |
| string | Marker string, eg. "###CONTENT_PART###" |
| t3lib_parsehtml_proc::getURL | ( | $ | url | ) |
Reads the file or url $url and returns the content
| string | Filepath/URL to read |
| t3lib_parsehtml_proc::getWHFromAttribs | ( | $ | attribArray | ) |
Finds width and height from attrib-array If the width and height is found in the style-attribute, use that!
| array | Array of attributes from tag in which to search. More specifically the content of the key "style" is used to extract "width:xxx / height:xxx" information |
| t3lib_parsehtml::HTMLcleaner | ( | $ | content, | |
| $ | tags = array(), |
|||
| $ | keepAll = 0, |
|||
| $ | hSC = 0, |
|||
| $ | addConfig = array() | |||
| ) | [inherited] |
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 '' )
| 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. "&" or "ê") | |
| array | Configuration array send along as $conf to the internal functions ->processContent() and ->processTag() |
| t3lib_parsehtml_proc::HTMLcleaner_db | ( | $ | content, | |
| $ | tagList = '' | |||
| ) |
Function for cleaning content going into the database. Content is cleaned eg. by removing unallowed HTML and ds-HSC content It is basically calling HTMLcleaner from the parent class with some preset configuration specifically set up for cleaning content going from the RTE into the db
| string | Content to clean up | |
| string | Comma list of tags to specifically allow. Default comes from getKeepTags and is "" |
| t3lib_parsehtml::HTMLparserConfig | ( | $ | TSconfig, | |
| $ | keepTags = array() | |||
| ) | [inherited] |
Converts TSconfig into an array for the HTMLcleaner function.
| array | TSconfig for HTMLcleaner | |
| array | Array of tags to keep (?) |
| t3lib_parsehtml::indentLines | ( | $ | content, | |
| $ | number = 1, |
|||
| $ | indentChar = "\t" | |||
| ) | [inherited] |
Indents input content with $number instances of $indentChar
| string | Content string, multiple lines. | |
| integer | Number of indents | |
| string | Indent character/string |
| t3lib_parsehtml_proc::init | ( | $ | elRef = '', |
|
| $ | recPid = 0 | |||
| ) |
Initialize, setting element reference and record PID
| string | Element reference, eg "tt_content:bodytext" | |
| integer | PID of the record (page id) |
| t3lib_parsehtml_proc::internalizeFontTags | ( | $ | value | ) |
This splits the $value in font-tag chunks. If there are any
/
| t3lib_parsehtml::mapTags | ( | $ | value, | |
| $ | tags = array(), |
|||
| $ | ltChar = '<', |
|||
| $ | ltChar2 = '<' | |||
| ) | [inherited] |
This is used to map certain tag-names into other names.
| string | HTML content | |
| array | Array with tag key=>value pairs where key is from-tag and value is to-tag | |
| string | Alternative less-than char to search for (search regex string) | |
| string | Alternative less-than char to replace with (replace regex string) |
| t3lib_parsehtml::prefixRelPath | ( | $ | prefix, | |
| $ | srcVal, | |||
| $ | suffix = '' | |||
| ) | [inherited] |
Internal sub-function for ->prefixResourcePath()
| string | Prefix string | |
| string | Relative path/URL | |
| string | Suffix string |
| t3lib_parsehtml::prefixResourcePath | ( | $ | main_prefix, | |
| $ | content, | |||
| $ | alternatives = array(), |
|||
| $ | suffix = '' | |||
| ) | [inherited] |
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
| string | Prefix string | |
| string | HTML content | |
| array | Array with alternative prefixes for certain of the tags. key=>value pairs where the keys are the tag element names in uppercase | |
| string | Suffix string (put after the resource). |
| t3lib_parsehtml::processContent | ( | $ | value, | |
| $ | dir, | |||
| $ | conf | |||
| ) | [inherited] |
Processing content between tags for HTML_cleaner
| string | The value | |
| integer | Direction, either -1 or +1. 0 (zero) means no change to input value. | |
| mixed | Not used, ignore. |
Erneute Implementation in local_t3lib_parsehtml.
| t3lib_parsehtml::processTag | ( | $ | value, | |
| $ | conf, | |||
| $ | endTag, | |||
| $ | protected = 0 | |||
| ) | [inherited] |
Processing all tags themselves (Some additions by Sacha Vorbeck)
| string | Tag to process | |
| array | Configuration array passing instructions for processing. If count()==0, function will return value unprocessed. See source code for details | |
| boolean | Is endtag, then set this. | |
| boolean | If set, just return value straight away |
| t3lib_parsehtml::removeFirstAndLastTag | ( | $ | str | ) | [inherited] |
Removes the first and last tag in the string Anything before the first and after the last tags respectively is also removed
| string | String to process |
| t3lib_parsehtml_proc::removeTables | ( | $ | value, | |
| $ | breakChar = '<br />' | |||
| ) |
Remove all tables from incoming code The function is trying to to this is some more or less respectfull way. The approach is to resolve each table cells content and implode it all by
chars. Thus at least the content is preserved in some way.
| string | Input value | |
| string | Break character to use for linebreaks. |
| t3lib_parsehtml_proc::RTE_transform | ( | $ | value, | |
| $ | specConf, | |||
| $ | direction = 'rte', |
|||
| $ | thisConfig = array() | |||
| ) |
Transform value for RTE based on specConf in the direction specified by $direction (rte/db) This is the main function called from tcemain and transfer data classes
| string | Input value | |
| array | Special configuration for a field; This is coming from the types-configuration of the field in the TCA. In the types-configuration you can setup features for the field rendering and in particular the RTE takes al its major configuration options from there! | |
| string | Direction of the transformation. Two keywords are allowed; "db" or "rte". If "db" it means the transformation will clean up content coming from the Rich Text Editor and goes into the database. The other direction, "rte", is of course when content is coming from database and must be transformed to fit the RTE. | |
| array | Parsed TypoScript content configuring the RTE, probably coming from Page TSconfig. |
| t3lib_parsehtml_proc::rteImageStorageDir | ( | ) |
Return the storage folder of RTE image files. Default is $GLOBALS['TYPO3_CONF_VARS']['BE']['RTE_imageStorageDir'] unless something else is configured in the types configuration for the RTE.
| t3lib_parsehtml_proc::setDivTags | ( | $ | value, | |
| $ | dT = 'p' | |||
| ) |
Converts all lines into
/
-sections (unless the line is a div-section already) For processing of content going FROM database TO RTE.
| string | Value to convert | |
| string | Tag to wrap with. Either "p" or "div" should it be. Lowercase preferably. |
| t3lib_parsehtml_proc::setRelPath | ( | $ | path | ) |
Setting the ->relPath and ->relBackPath to proper values so absolute references to links and images can be converted to relative dittos. This is used when editing files with the RTE
| string | The relative path from PATH_site to the place where the file being edited is. Eg. "fileadmin/static". |
| t3lib_parsehtml_proc::siteUrl | ( | ) |
Returns SiteURL based on thisScript.
| t3lib_parsehtml::split_tag_attributes | ( | $ | tag | ) | [inherited] |
Returns an array with the 'components' from an attribute list. The result is normally analyzed by get_tag_attributes Removes tag-name if found
| string | The tag or attributes |
| t3lib_parsehtml::splitIntoBlock | ( | $ | tag, | |
| $ | content, | |||
| $ | eliminateExtraEndTags = 0 | |||
| ) | [inherited] |
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.
| string | List of tags, comma separated. | |
| string | HTML-content | |
| boolean | If set, excessive end tags are ignored - you should probably set this in most cases. |
| t3lib_parsehtml::splitIntoBlockRecursiveProc | ( | $ | tag, | |
| $ | content, | |||
| &$ | procObj, | |||
| $ | callBackContent, | |||
| $ | callBackTags, | |||
| $ | level = 0 | |||
| ) | [inherited] |
Splitting content into blocks *recursively* and processing tags/content with call back functions.
| string | Tag list, see splitIntoBlock() | |
| string | Content, see splitIntoBlock() | |
| object | Object where call back methods are. | |
| string | Name of call back method for content; "function callBackContent($str,$level)" | |
| string | Name of call back method for tags; "function callBackTags($tags,$level)" | |
| integer | Indent level |
| t3lib_parsehtml::splitTags | ( | $ | tag, | |
| $ | content | |||
| ) | [inherited] |
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.
| string | List of tags | |
| string | HTML-content |
| t3lib_parsehtml::stripTagsExcept | ( | $ | value, | |
| $ | tagList | |||
| ) | [inherited] |
Strips tags except the tags in the list, $tagList OBSOLETE - use PHP function strip_tags()
| string | Value to process | |
| string | List of tags |
| t3lib_parsehtml::substituteMarker | ( | $ | content, | |
| $ | marker, | |||
| $ | markContent | |||
| ) | [inherited] |
Substitutes a marker string in the input content (by a simple str_replace())
| string | The content stream, typically HTML template content. | |
| string | The marker string, typically on the form "###[the marker string]###" | |
| mixed | The content to insert instead of the marker string found. |
| t3lib_parsehtml::substituteMarkerArray | ( | $ | content, | |
| $ | markContentArray, | |||
| $ | wrap = '', |
|||
| $ | uppercase = 0, |
|||
| $ | deleteUnused = 0 | |||
| ) | [inherited] |
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.
| string | The content stream, typically HTML template content. | |
| array | The 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. | |
| string | A wrap value - [part 1] | [part 2] - for the markers before substitution | |
| boolean | If set, all marker string substitution is done with upper-case markers. | |
| boolean | If set, all unused marker are deleted. |
| t3lib_parsehtml::substituteSubpart | ( | $ | content, | |
| $ | marker, | |||
| $ | subpartContent, | |||
| $ | recursive = 1, |
|||
| $ | keepMarker = 0 | |||
| ) | [inherited] |
Substitutes a subpart in $content with the content of $subpartContent.
| string | Content with subpart wrapped in fx. "###CONTENT_PART###" inside. | |
| string | Marker string, eg. "###CONTENT_PART###" | |
| array | If $subpartContent happens to be an array, it's [0] and [1] elements are wrapped around the content of the subpart (fetched by getSubpart()) | |
| boolean | If $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! | |
| boolean | If set, the marker around the subpart is not removed, but kept in the output |
| t3lib_parsehtml_proc::transformStyledATags | ( | $ | value | ) |
Wraps a-tags that contain a style attribute with a span-tag
| string | Content input |
| t3lib_parsehtml_proc::TS_AtagToAbs | ( | $ | value, | |
| $ | dontSetRTEKEEP = FALSE | |||
| ) |
Converting -tags to absolute URLs (+ setting rtekeep attribute)
| string | Content input | |
| boolean | If true, then the "rtekeep" attribute will not be set. |
| t3lib_parsehtml_proc::TS_images_db | ( | $ | value | ) |
Transformation handler: 'ts_images' / direction: "db" Processing images inserted in the RTE. This is used when content goes from the RTE to the database. Images inserted in the RTE has an absolute URL applied to the src attribute. This URL is converted to a relative URL If it turns out that the URL is from another website than the current the image is read from that external URL and moved to the local server. Also "magic" images are processed here.
| string | The content from RTE going to Database |
| t3lib_parsehtml_proc::TS_images_rte | ( | $ | value | ) |
Transformation handler: 'ts_images' / direction: "rte" Processing images from database content going into the RTE. Processing includes converting the src attribute to an absolute URL.
| string | Content input |
| t3lib_parsehtml_proc::TS_links_db | ( | $ | value | ) |
Transformation handler: 'ts_links' / direction: "db" Converting -tags to <link tags>="">
| string | Content input |
| t3lib_parsehtml_proc::TS_links_rte | ( | $ | value | ) |
Transformation handler: 'ts_links' / direction: "rte" Converting <link tags>=""> to -tags
| string | Content input |
| t3lib_parsehtml_proc::TS_preserve_db | ( | $ | value | ) |
Preserve special tags
| string | Content input |
| t3lib_parsehtml_proc::TS_preserve_rte | ( | $ | value | ) |
Preserve special tags
| string | Content input |
| t3lib_parsehtml_proc::TS_reglinks | ( | $ | value, | |
| $ | direction | |||
| ) |
Transformation handler: 'ts_reglinks' / direction: "db"+"rte" depending on $direction variable. Converting -tags to/from abs/rel
| string | Content input | |
| string | Direction of conversion; "rte" (from database to RTE) or "db" (from RTE to database) |
| t3lib_parsehtml_proc::TS_strip_db | ( | $ | value | ) |
Transformation handler: 'ts_strip' / direction: "db" Removing all non-allowed tags
| string | Content input |
| t3lib_parsehtml_proc::TS_transform_db | ( | $ | value, | |
| $ | css = FALSE | |||
| ) |
Transformation handler: 'ts_transform' + 'css_transform' / direction: "db" Cleaning (->db) for standard content elements (ts)
| string | Content input | |
| boolean | If true, the transformation was "css_transform", otherwise "ts_transform" |
| t3lib_parsehtml_proc::TS_transform_rte | ( | $ | value, | |
| $ | css = 0 | |||
| ) |
Transformation handler: 'ts_transform' + 'css_transform' / direction: "rte" Set (->rte) for standard content elements (ts)
| string | Content input | |
| boolean | If true, the transformation was "css_transform", otherwise "ts_transform" |
| t3lib_parsehtml::unprotectTags | ( | $ | content, | |
| $ | tagList = '' | |||
| ) | [inherited] |
This converts htmlspecialchar()'ed tags (from $tagList) back to real tags. Eg. '<strong>' would be converted back to '' if found in $tagList
| string | HTML content | |
| string | Tag list, separated by comma. Lowercase! |
| t3lib_parsehtml_proc::urlInfoForLinkTags | ( | $ | url | ) |
Parse -tag href and return status of email,external,file or page
| string | URL to analyse. |
| t3lib_parsehtml::XHTML_clean | ( | $ | content | ) | [inherited] |
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.:
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:
| string | Content to clean up |
1.6.1