---
title: "HTMLparser"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:htmlparser@main"
source: "Functions/Htmlparser.rst"
rendered: "2026-09-18T06:55:17+00:00"
---

# HTMLparser {#htmlparser-1}

-   [Properties](https://docs.typo3.org/permalink/t3tsref:properties@main)

## Properties {#properties}

### allowTags {#allowtags}

-   **allowTags**

    -   *Type:* list of tags

    Default allowed tags.

### stripEmptyTags {#stripemptytags}

-   **stripEmptyTags**

    -   *Type:* [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main)

    Passes the content to PHPs `strip_tags()`.

### stripEmptyTags.keepTags {#stripemptytags-keeptags}

-   **stripEmptyTags.keepTags**

    -   *Type:* [string](https://docs.typo3.org/permalink/t3tsref:data-type-string@main)

    Comma separated list of tags to keep when applying `strip_tags()`.

### tags.\[tagname\] {#tags-tagname}

-   **tags**

    -   *Type:* [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main) / string of [HTMLparser_tags](https://docs.typo3.org/permalink/t3tsref:htmlparser-tags@main)

    Either set this property to `0` or `1` to allow or deny the tag. If you
    enter [HTMLparser_tags](https://docs.typo3.org/permalink/t3tsref:htmlparser-tags@main) properties, those will automatically overrule
    this option, thus it's not needed then.

    \[tagname\] in lowercase.

### localNesting {#localnesting}

-   **localNesting**

    -   *Type:* list of tags, must be among preserved tags

    List of tags (among the already set tags), which will be forced to
    have the nesting-flag set to true.

### globalNesting {#globalnesting}

-   **globalNesting**

    -   *Type:* (ibid)

    List of tags (among the already set tags), which will be forced to
    have the nesting-flag set to "global".

### rmTagIfNoAttrib {#rmtagifnoattrib}

-   **rmTagIfNoAttrib**

    -   *Type:* (ibid)

    List of tags (among the already set tags), which will be forced to
    have the [rmTagIfNoAttrib](https://docs.typo3.org/permalink/t3tsref:htmlparser-rmtagifnoattrib@main) set to true.

### noAttrib {#noattrib}

-   **noAttrib**

    -   *Type:* (ibid)

    List of tags (among the already set tags), which will be forced to
    have the allowedAttribs value set to zero (which means, all attributes
    will be removed.

### removeTags {#removetags}

-   **removeTags**

    -   *Type:* string-list / array

    List of tags (among the already set tags), which will be configured so
    they are surely removed.

    **EXT:rte_ckeditor/Configuration/RTE/Processing.yaml**

    ```yaml
    processing:
      HTMLparser_db:
        removeTags: [link, meta, o:p, sdfield, style, title]
        # "string" definition is also possible:
        # removeTags: link, meta, o:p, sdfield, style, title

    ```

    **EXT:my_extension/Configuration/TypoScript/page.tsconfig**

    ```typoscript
    RTE.default.proc {
      HTMLparser_db {
        removeTags = link, meta, o:p, sdfield, style, title
      }
    }

    ```

### keepNonMatchedTags {#keepnonmatchedtags}

-   **keepNonMatchedTags**

    -   *Type:* [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main) / "protect"

    If set (`1`), then all tags are kept regardless of tags present as
    keys in `$tags`-array.

    If `protect`, then the preserved tags have their `<>`
    converted to `&lt;` and `&gt;`.

    Default is to REMOVE all tags, which are not specifically assigned to
    be allowed! So you might probably want to set this value!

### htmlSpecialChars {#htmlspecialchars}

-   **htmlSpecialChars**

    -   *Type:* -1 / 0 / 1 / 2

    This regards all content which is **not** tags:

    -   **-1**

        Does the opposite of "1". It converts `&lt;` to `<`,
        `&gt;` to `>`, `&quot;` to `"` etc.

    -   **0**

        Disabled - nothing is done.

    -   **1**

        The content outside tags is `htmlspecialchar()`'ed (PHP-function
        which converts `&"<>` to `&...;`).

    -   **2**

        Same as "1", but entities like `&amp;` or `&#234` are
        untouched.
