HTMLparser_tags

Property

overrideAttribs

Data type

string

Description

If set, this string is preset as the attributes of the tag.

Property

allowedAttribs

Data type

mixed

Description

Defines the allowed attributes.

Possible values:

0 (zero): No attributes allowed.

(comma-separated list of attributes): Only attributes in this list are allowed.

(blank/not set): All attributes are allowed.

Property

fixAttrib.[attribute].set

Data type

string

Description

Force the attribute value to this value.

Property

fixAttrib.[attribute].unset

Data type

boolean

Description

If set, the attribute is unset.

Property

fixAttrib.[attribute].default

Data type

string

Description

If no attribute exists by this name, this value is set as default value (if this value is not blank)

Property

fixAttrib.[attribute].always

Data type

boolean

Description

If set, the attribute is always processed. Normally an attribute is processed only if it exists

Property

fixAttrib.[attribute].trim

fixAttrib.[attribute].intval

fixAttrib.[attribute].upper

fixAttrib.[attribute].lower

Data type

boolean

Description

If any of these keys are set, the value is passed through the respective PHP-functions.

Property

fixAttrib.[attribute].range

Data type

[low],[high]

Description

Setting integer range.

Property

fixAttrib.[attribute].list

Data type

list of values, trimmed

Description

Attribute value must be in this list. If not, the value is set to the first element.

Property

fixAttrib.[attribute].removeIfFalse

Data type

boolean/”blank” string

Description

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)

Property

fixAttrib.[attribute].removeIfEquals

Data type

string

Description

If the attribute value matches the value set here, then it is removed.

Property

fixAttrib.[attribute].casesensitiveComp

Data type

boolean

Description

If set, the comparison in .removeIfEquals and .list will be case- sensitive. At this point, it’s insensitive.

Property

fixAttrib.[attribute].prefixLocalAnchors

Data type

integer

Description

If the first char is a “#” character (anchor of fx. <a> tags) this will prefix either a relative or absolute path.

If the value is “1” you will get the absolute path (TYPO3CMSCoreUtilityGeneralUtility::getIndpEnv(‘TYPO3_REQUEST_URL’) or t3lib_div::getIndpEnv(‘TYPO3_REQUEST_URL’)).

If the value is “2” you will get the relative path (stripping of TYPO3CMSCoreUtilityGeneralUtility::getIndpEnv(‘TYPO3_SITE_URL’) or t3lib_div::getIndpEnv(‘TYPO3_SITE_URL’)).

Example:

...fixAttrib.href.prefixLocalAnchors = 1

Property

fixAttrib.[attribute].prefixRelPathWith

Data type

string

Description

If the value of the attribute seems to be a relative URL (no scheme like “http” and no “/” as first char) then the value of this property will be prefixed the attribute.

Example:

…fixAttrib.src.prefixRelPathWith = http://192.168.230.3/typo3/32/dummy/

Property

fixAttrib.[attribute].userFunc

Data type

function reference

Description

User function for processing of the attribute.

Example:

…fixAttrib.href.userFunc = tx_realurl->test_urlProc

Property

protect

Data type

boolean

Description

If set, the tag <> is converted to &lt; and &gt;

Property

remap

Data type

string

Description

If set, the tagname is remapped to this tagname

Property

rmTagIfNoAttrib

Data type

boolean

Description

If set, then the tag is removed if no attributes happened to be there.

Property

nesting

Data type

mixed

Description

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 ‘</B><B><I></B></I></B>’ will be converted to ‘<B><I></B></I>’.

Is the value “global” then true nesting in relation to other tags marked for “global” nesting control is preserved. This means that if <B> and <I> are set for global nesting then this string ‘</B><B><I></B></I></B>’ is converted to ‘<B></B>’

[page:->HTMLparser_tags; tsref:->HTMLparser_tags]