‪TYPO3CMS  9.5
TYPO3\CMS\Core\Html\RteHtmlParser Class Reference
Inheritance diagram for TYPO3\CMS\Core\Html\RteHtmlParser:
TYPO3\CMS\Core\Html\HtmlParser

Public Member Functions

 init ($elRef='', $recPid=0)
 
string RTE_transform ($value, $_=null, $direction='rte', $thisConfig=[])
 
string TS_images_rte ($value)
 
string TS_links_rte ($value, $internallyCalledFromCore=null)
 
string transformStyledATags ($value)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Html\HtmlParser
array splitIntoBlock ($tag, $content, $eliminateExtraEndTags=false)
 
string splitIntoBlockRecursiveProc ($tag, $content, &$procObj, $callBackContent, $callBackTags, $level=0)
 
array splitTags ($tag, $content)
 
string removeFirstAndLastTag ($str)
 
string getFirstTag ($str)
 
string getFirstTagName ($str, $preserveCase=false)
 
array get_tag_attributes ($tag, $deHSC=false)
 
array split_tag_attributes ($tag)
 
string HTMLcleaner ($content, $tags=[], $keepAll=0, $hSC=0, $addConfig=[])
 
string bidir_htmlspecialchars ($value, $dir)
 
string prefixResourcePath ($main_prefix, $content, $alternatives=[], $suffix='')
 
string prefixRelPath ($prefix, $srcVal, $suffix='')
 
string caseShift ($str, $caseSensitiveComparison, $cacheKey='')
 
string compileTagAttribs ($tagAttrib, $meta=[])
 
array HTMLparserConfig ($TSconfig, $keepTags=[])
 
string stripEmptyTags ($content, $tagList='', $treatNonBreakingSpaceAsEmpty=false, $keepTags=false)
 

Protected Member Functions

array resolveAppliedTransformationModes (string $direction, array $modes)
 
string runHtmlParserIfConfigured ($content, $configurationDirective)
 
string TS_images_db ($value)
 
string TS_links_db ($value)
 
string TS_transform_db ($value)
 
string TS_transform_rte ($value)
 
string HTMLcleaner_db ($content)
 
array getKeepTags ($direction='rte')
 
string array divideIntoLines ($value, $count=5, $returnArray=false)
 
string setDivTags ($value)
 
string processContentWithinParagraph (string $content, string $fullContentWithTag)
 
string sanitizeLineBreaksForContentOnly (string $content)
 
array getWHFromAttribs ($attribArray)
 
array urlInfoForLinkTags ($url)
 
string TS_AtagToAbs ($value)
 
array applyPlainImageModeSettings ($imageInfo, $attribArray)
 
string streamlineLineBreaksForProcessing (string $content)
 
string streamlineLineBreaksAfterProcessing (string $content)
 
string markBrokenLinks (string $content)
 
string removeBrokenLinkMarkers (string $content)
 
 htmlSanitize (string $content, array $configuration)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Html\HtmlParser
string stripEmptyTagsIfConfigured ($value, $configuration)
 

Protected Attributes

 $deprecatedPublicProperties
 
 $deprecatedPublicMethods
 
string $blockElementList = 'DIV,TABLE,BLOCKQUOTE,PRE,UL,OL,H1,H2,H3,H4,H5,H6,ADDRESS,DL,DD,HEADER,SECTION,FOOTER,NAV,ARTICLE,ASIDE'
 
string $defaultAllowedTagsList = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span,abbr,acronym,dfn'
 
int $recPid = 0
 
string $elRef = ''
 
array $tsConfig = array( )
 
array $procOptions = array( )
 
int $TS_transform_db_safecounter = 100
 
array $getKeepTags_cache = array( )
 
array $allowedClasses = array( )
 
array $allowedAttributesForParagraphTags
 
array $allowedTagsOutsideOfParagraphs
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Html\HtmlParser
array $caseShift_cache = array( )
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Html\HtmlParser
const VOID_ELEMENTS = 'area|base|br|col|command|embed|hr|img|input|keygen|meta|param|source|track|wbr'
 

Detailed Description

Class for parsing HTML for the Rich Text Editor. (also called transformations)

Concerning line breaks: Regardless if LF (Unix-style) or CRLF (Windows) was put in, the HtmlParser works with LFs and migrates all line breaks to LFs internally, however when all transformations are done, all LFs are transformed to CRLFs. This means: RteHtmlParser always returns CRLFs to be maximum compatible with all formats.

Definition at line 39 of file RteHtmlParser.php.

Member Function Documentation

◆ applyPlainImageModeSettings()

array TYPO3\CMS\Core\Html\RteHtmlParser::applyPlainImageModeSettings (   $imageInfo,
  $attribArray 
)
protected

Apply plain image settings to the dimensions of the image

Parameters
array$imageInfo,‪info array of the image
array$attribArray,‪array of attributes of an image tag
Returns
‪array a modified attributes array

Definition at line 1251 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\TS_images_db().

◆ divideIntoLines()

string array TYPO3\CMS\Core\Html\RteHtmlParser::divideIntoLines (   $value,
  $count = 5,
  $returnArray = false 
)
protected

This resolves the $value into parts based on

-sections. These are returned as lines separated by LF. 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.

Parameters
string$value‪Value to process.
int$count‪Recursion brake. Decremented on each recursion down to zero. Default is 5 (which equals the allowed nesting levels of p tags).
bool$returnArray‪If TRUE, an array with the lines is returned, otherwise a string of the processed input value.
Returns
‪string|array Processed input value.
See also
setDivTags()

Definition at line 970 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\processContentWithinParagraph(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), TYPO3\CMS\Core\Html\RteHtmlParser\sanitizeLineBreaksForContentOnly(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\TS_transform_db().

◆ getKeepTags()

array TYPO3\CMS\Core\Html\RteHtmlParser::getKeepTags (   $direction = 'rte')
protected

Creates an array of configuration for the HTMLcleaner function based on whether content go TO or FROM the Rich Text Editor ($direction)

Parameters
string$direction‪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)
Returns
‪array Configuration array
See also
HTMLcleaner_db()

Definition at line 899 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\$allowedClasses, and TYPO3\CMS\Core\Html\HtmlParser\HTMLparserConfig().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\HTMLcleaner_db(), TYPO3\CMS\Core\Html\RteHtmlParser\setDivTags(), and TYPO3\CMS\Core\Html\RteHtmlParser\TS_transform_db().

◆ getWHFromAttribs()

array TYPO3\CMS\Core\Html\RteHtmlParser::getWHFromAttribs (   $attribArray)
protected

Finds width and height from attrib-array If the width and height is found in the style-attribute, use that!

Parameters
array$attribArray‪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
Returns
‪array Integer w/h in key 0/1. Zero is returned if not found.

Definition at line 1121 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\TS_images_db().

◆ HTMLcleaner_db()

string TYPO3\CMS\Core\Html\RteHtmlParser::HTMLcleaner_db (   $content)
protected

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

Parameters
string$content‪Content to clean up
Returns
‪string Clean content
See also
getKeepTags()

Definition at line 880 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\getKeepTags(), and TYPO3\CMS\Core\Html\HtmlParser\HTMLcleaner().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\processContentWithinParagraph().

◆ htmlSanitize()

TYPO3\CMS\Core\Html\RteHtmlParser::htmlSanitize ( string  $content,
array  $configuration 
)
protected

Definition at line 1383 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ init()

TYPO3\CMS\Core\Html\RteHtmlParser::init (   $elRef = '',
  $recPid = 0 
)

Initialize, setting element reference and record PID

Parameters
string$elRef‪Element reference, eg "tt_content:bodytext
int$recPid‪PID of the record (page id)

Definition at line 165 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\$elRef, and TYPO3\CMS\Core\Html\RteHtmlParser\$recPid.

◆ markBrokenLinks()

string TYPO3\CMS\Core\Html\RteHtmlParser::markBrokenLinks ( string  $content)
protected

Content Transformation from DB to RTE Checks all tags which reference a t3://page and checks if the page is available If not, some offensive styling is added.

Parameters
string$content
Returns
‪string the modified content

Definition at line 1319 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock(), and TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_PAGE.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ processContentWithinParagraph()

string TYPO3\CMS\Core\Html\RteHtmlParser::processContentWithinParagraph ( string  $content,
string  $fullContentWithTag 
)
protected

Used for transformation from RTE to DB

Works on a single line within a

tag when storing into the database This always adds

tags and validates the arguments, additionally the content is cleaned up via the HTMLcleaner.

Parameters
string$content‪the content within the

tag

Parameters
string$fullContentWithTag‪the whole

tag surrounded as well

Returns
‪string the full

tag with cleaned content

Definition at line 1068 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\compileTagAttribs(), TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), and TYPO3\CMS\Core\Html\RteHtmlParser\HTMLcleaner_db().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\divideIntoLines().

◆ removeBrokenLinkMarkers()

string TYPO3\CMS\Core\Html\RteHtmlParser::removeBrokenLinkMarkers ( string  $content)
protected

Content Transformation from RTE to DB Removes link information error attributes from tags that are added to broken links

Parameters
string$content‪the content to process
Returns
‪string the modified content

Definition at line 1355 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ resolveAppliedTransformationModes()

array TYPO3\CMS\Core\Html\RteHtmlParser::resolveAppliedTransformationModes ( string  $direction,
array  $modes 
)
protected

Ensures what transformation modes should be executed, and that they are only executed once.

Parameters
string$direction
array$modes
Returns
‪array the resolved transformation modes

Definition at line 311 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ RTE_transform()

string TYPO3\CMS\Core\Html\RteHtmlParser::RTE_transform (   $value,
  $_ = null,
  $direction = 'rte',
  $thisConfig = [] 
)

Transform value for RTE based on specConf in the direction specified by $direction (rte/db) This is the main function called from DataHandler and transfer data classes

Parameters
string$value‪Input value
null$_‪unused
string$direction‪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$thisConfig‪Parsed TypoScript content configuring the RTE, probably coming from Page TSconfig.
Returns
‪string Output value

Definition at line 186 of file RteHtmlParser.php.

References $GLOBALS, TYPO3\CMS\Core\Html\RteHtmlParser\htmlSanitize(), TYPO3\CMS\Core\Html\RteHtmlParser\markBrokenLinks(), TYPO3\CMS\Core\Html\RteHtmlParser\removeBrokenLinkMarkers(), TYPO3\CMS\Core\Html\RteHtmlParser\resolveAppliedTransformationModes(), TYPO3\CMS\Core\Html\RteHtmlParser\runHtmlParserIfConfigured(), TYPO3\CMS\Core\Html\RteHtmlParser\streamlineLineBreaksAfterProcessing(), TYPO3\CMS\Core\Html\RteHtmlParser\streamlineLineBreaksForProcessing(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_images_db(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_images_rte(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_links_db(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_links_rte(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_transform_db(), and TYPO3\CMS\Core\Html\RteHtmlParser\TS_transform_rte().

◆ runHtmlParserIfConfigured()

string TYPO3\CMS\Core\Html\RteHtmlParser::runHtmlParserIfConfigured (   $content,
  $configurationDirective 
)
protected

Runs the HTML parser if it is configured Getting additional HTML cleaner configuration. These are applied either before or after the main transformation is done and thus totally independent processing options you can set up.

This is only possible via TSconfig (procOptions) currently.

Parameters
string$content
string$configurationDirective‪used to look up in the procOptions if enabled, and then fetch the
Returns
‪string the processed content

Definition at line 339 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\HTMLcleaner(), and TYPO3\CMS\Core\Html\HtmlParser\HTMLparserConfig().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ sanitizeLineBreaksForContentOnly()

string TYPO3\CMS\Core\Html\RteHtmlParser::sanitizeLineBreaksForContentOnly ( string  $content)
protected

Wrap


tags with LFs, and also remove double LFs, used when transforming from RTE to DB

Parameters
string$content
Returns
‪string the modified content

Definition at line 1106 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\divideIntoLines().

◆ setDivTags()

string TYPO3\CMS\Core\Html\RteHtmlParser::setDivTags (   $value)
protected

Converts all lines into

-sections (unless the line has a p - tag already) For processing of content going FROM database TO RTE.

Parameters
string$value‪Value to convert
Returns
‪string Processed value.
See also
divideIntoLines()

Definition at line 1023 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\getKeepTags(), and TYPO3\CMS\Core\Html\HtmlParser\HTMLcleaner().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\TS_transform_rte().

◆ streamlineLineBreaksAfterProcessing()

string TYPO3\CMS\Core\Html\RteHtmlParser::streamlineLineBreaksAfterProcessing ( string  $content)
protected

Called after any processing / transformation was made just before the content is returned by the RTE parser all line breaks get unified to be "CRLF"s again.

Historical note: Previously it was possible to disable this functionality via disableUnifyLineBreaks.

Parameters
string$content‪the content to process
Returns
‪string the modified content

Definition at line 1303 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\RteHtmlParser\streamlineLineBreaksForProcessing().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ streamlineLineBreaksForProcessing()

string TYPO3\CMS\Core\Html\RteHtmlParser::streamlineLineBreaksForProcessing ( string  $content)
protected

Called before any processing / transformation is made Removing any CRs (char 13) and only deal with LFs (char 10) internally. CR has a very disturbing effect, so just remove all CR and rely on LF

Historical note: Previously it was possible to disable this functionality via disableUnifyLineBreaks.

Parameters
string$content‪the content to process
Returns
‪string the modified content

Definition at line 1288 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform(), and TYPO3\CMS\Core\Html\RteHtmlParser\streamlineLineBreaksAfterProcessing().

◆ transformStyledATags()

string TYPO3\CMS\Core\Html\RteHtmlParser::transformStyledATags (   $value)

Wraps a-tags that contain a style attribute with a span-tag This is not in use anymore, but was necessary before because tags are transformed into <link> tags in the database, but <link> tags cannot handle style attributes. However, this is considered a bad approach as it leaves an ugly tag in the database, if allowedTags=span with style attributes are allowed.

Parameters
string$value‪Content input
Returns
‪string Content output
Deprecated:
‪since TYPO3 v9.0, will be removed in TYPO3 v10.0, see comment above, adding attribuet "rteerror" is not necessary anymore.

Definition at line 785 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

◆ TS_AtagToAbs()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_AtagToAbs (   $value)
protected

Converting -tags to absolute URLs (+ setting rtekeep attribute)

Parameters
string$value‪Content input
Returns
‪string Content output

Definition at line 1217 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\TS_links_rte().

◆ TS_images_db()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_images_db (   $value)
protected

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.

Parameters
string$value‪The content from RTE going to Database
Returns
‪string Processed content

Definition at line 364 of file RteHtmlParser.php.

References $GLOBALS, TYPO3\CMS\Core\Html\RteHtmlParser\applyPlainImageModeSettings(), TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Resource\ResourceFactory\getInstance(), TYPO3\CMS\Core\Html\RteHtmlParser\getWHFromAttribs(), and TYPO3\CMS\Core\Html\HtmlParser\splitTags().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ TS_images_rte()

string TYPO3\CMS\Core\Html\RteHtmlParser::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.

Parameters
string$value‪Content input
Returns
‪string Content output

Definition at line 529 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), and TYPO3\CMS\Core\Html\HtmlParser\splitTags().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ TS_links_db()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_links_db (   $value)
protected

Transformation handler: 'ts_links' / direction: "db" Processing anchor tags, and resolves them correctly again via the LinkService syntax

Splits content into tag blocks and processes each tag, and allows hooks to actually render the result.

Parameters
string$value‪Content input
Returns
‪string Content output
See also
TS_links_rte()

Definition at line 571 of file RteHtmlParser.php.

References $GLOBALS, TYPO3\CMS\Core\Html\HtmlParser\get_tag_attributes(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ TS_links_rte()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_links_rte (   $value,
  $internallyCalledFromCore = null 
)

Transformation handler: 'ts_links' / direction: "rte" Converting TYPO3-specific <link> tags to tags

This functionality is only used to convert legacy <link> tags to the new linking syntax using tags, and will not be converted back to <link> tags anymore.

Parameters
string$value‪Content input
bool$internallyCalledFromCore‪internal option for calls where the Core is still using this function, to supress method deprecations
Returns
‪string Content output
Deprecated:
‪will be removed in TYPO3 v10.0, only ->TS_AtagToAbs() should be called directly, <link> syntax is deprecated

Definition at line 626 of file RteHtmlParser.php.

References $GLOBALS, TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock(), TYPO3\CMS\Core\Html\RteHtmlParser\TS_AtagToAbs(), TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_PAGE, and TYPO3\CMS\Core\LinkHandling\LinkService\TYPE_URL.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ TS_transform_db()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_transform_db (   $value)
protected

◆ TS_transform_rte()

string TYPO3\CMS\Core\Html\RteHtmlParser::TS_transform_rte (   $value)
protected

Transformation handler: css_transform / direction: "rte" Set (->rte) for standard content elements (ts)

Parameters
string$value‪Content input
Returns
‪string Content output
See also
TS_transform_db()

Definition at line 814 of file RteHtmlParser.php.

References TYPO3\CMS\Core\Html\HtmlParser\getFirstTag(), TYPO3\CMS\Core\Html\HtmlParser\getFirstTagName(), TYPO3\CMS\Core\Html\HtmlParser\removeFirstAndLastTag(), TYPO3\CMS\Core\Html\RteHtmlParser\setDivTags(), and TYPO3\CMS\Core\Html\HtmlParser\splitIntoBlock().

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\RTE_transform().

◆ urlInfoForLinkTags()

array TYPO3\CMS\Core\Html\RteHtmlParser::urlInfoForLinkTags (   $url)
protected

Parse -tag href and return status of email,external,file or page This functionality is not in use anymore

Parameters
string$url‪URL to analyze.
Returns
‪array Information in an array about the URL
Deprecated:
‪will be removed in TYPO3 v10.0. Not in use anymore.

Definition at line 1153 of file RteHtmlParser.php.

Member Data Documentation

◆ $allowedAttributesForParagraphTags

array TYPO3\CMS\Core\Html\RteHtmlParser::$allowedAttributesForParagraphTags
protected
Initial value:
= array(
'class',
'align',
'id',
'title',
'dir',
'lang',
'xml:lang',
'itemscope',
'itemtype',
'itemprop'
)

A list of HTML attributes for

tags. Because

tags are wrapped currently in a special handling, they have a special place for configuration via 'proc.keepPDIVattribs'

Definition at line 127 of file RteHtmlParser.php.

◆ $allowedClasses

array TYPO3\CMS\Core\Html\RteHtmlParser::$allowedClasses = array( )
protected

Storage of the allowed CSS class names in the RTE

Definition at line 120 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\getKeepTags().

◆ $allowedTagsOutsideOfParagraphs

array TYPO3\CMS\Core\Html\RteHtmlParser::$allowedTagsOutsideOfParagraphs
protected
Initial value:
= array(
'address',
'article',
'aside',
'blockquote',
'div',
'footer',
'header',
'hr',
'nav',
'section'
)

Any tags that are allowed outside of

sections - usually similar to the block elements plus some special tags like


and (if images are allowed). Completely overrideable via 'proc.allowTagsOutside'

Definition at line 146 of file RteHtmlParser.php.

◆ $blockElementList

string TYPO3\CMS\Core\Html\RteHtmlParser::$blockElementList = 'DIV,TABLE,BLOCKQUOTE,PRE,UL,OL,H1,H2,H3,H4,H5,H6,ADDRESS,DL,DD,HEADER,SECTION,FOOTER,NAV,ARTICLE,ASIDE'
protected

List of elements that are not wrapped into a "p" tag while doing the transformation.

Definition at line 73 of file RteHtmlParser.php.

◆ $defaultAllowedTagsList

string TYPO3\CMS\Core\Html\RteHtmlParser::$defaultAllowedTagsList = 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span,abbr,acronym,dfn'
protected

List of all tags that are allowed by default

Definition at line 78 of file RteHtmlParser.php.

◆ $deprecatedPublicMethods

TYPO3\CMS\Core\Html\RteHtmlParser::$deprecatedPublicMethods
protected
Initial value:
= array(
'TS_images_db' => 'Using TS_images_db() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'TS_links_db' => 'Using TS_links_db() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'TS_transform_db' => 'Using TS_transform_db() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'TS_transform_rte' => 'Using TS_transform_rte() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'HTMLcleaner_db' => 'Using HTMLcleaner_db() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'getKeepTags' => 'Using getKeepTags() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'divideIntoLines' => 'Using divideIntoLines() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'setDivTags' => 'Using setDivTags() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'getWHFromAttribs' => 'Using getWHFromAttribs() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
'urlInfoForLinkTags' => 'Using urlInfoForLinkTags() of class RteHtmlParser from the outside is discouraged, as this method is not in use anymore and will be removed.',
'TS_AtagToAbs' => 'Using TS_AtagToAbs() of class RteHtmlParser from the outside is discouraged, as this method is only available for internal purposes.',
)

Definition at line 56 of file RteHtmlParser.php.

◆ $deprecatedPublicProperties

TYPO3\CMS\Core\Html\RteHtmlParser::$deprecatedPublicProperties
protected
Initial value:
= array(
'blockElementList' => 'Using $blockElementList of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'recPid' => 'Using $recPid of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'elRef' => 'Using $elRef of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'tsConfig' => 'Using $tsConfig of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'procOptions' => 'Using $procOptions of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'TS_transform_db_safecounter' => 'Using $TS_transform_db_safecounter of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'getKeepTags_cache' => 'Using $getKeepTags_cache of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
'allowedClasses' => 'Using $allowedClasses of class RteHtmlParser from the outside is discouraged, as this property is only used for internal storage.',
)

Definition at line 45 of file RteHtmlParser.php.

◆ $elRef

string TYPO3\CMS\Core\Html\RteHtmlParser::$elRef = ''
protected

Element reference [table]:[field], eg. "tt_content:bodytext"

Definition at line 90 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\init().

◆ $getKeepTags_cache

array TYPO3\CMS\Core\Html\RteHtmlParser::$getKeepTags_cache = array( )
protected

Data caching for processing function

Definition at line 114 of file RteHtmlParser.php.

◆ $procOptions

array TYPO3\CMS\Core\Html\RteHtmlParser::$procOptions = array( )
protected

Set to the TSconfig options coming from Page TSconfig

Definition at line 102 of file RteHtmlParser.php.

◆ $recPid

int TYPO3\CMS\Core\Html\RteHtmlParser::$recPid = 0
protected

Set this to the pid of the record manipulated by the class.

Definition at line 84 of file RteHtmlParser.php.

Referenced by TYPO3\CMS\Core\Html\RteHtmlParser\init().

◆ $TS_transform_db_safecounter

int TYPO3\CMS\Core\Html\RteHtmlParser::$TS_transform_db_safecounter = 100
protected

Run-away brake for recursive calls.

Definition at line 108 of file RteHtmlParser.php.

◆ $tsConfig

array TYPO3\CMS\Core\Html\RteHtmlParser::$tsConfig = array( )
protected

Current Page TSConfig

Definition at line 96 of file RteHtmlParser.php.