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

# parseFunc {#parsefunc-1}

<!-- TODO: no Markdown rendering for "versionchanged" -->

lib.parseFunc.allowTags and lib.parseFunc_RTE.allowTags do not contain
default values anymore. HTML sanitization is continued to be  handled by
the htmlSanitizer.See also: Breaking: #107438 - Default parseFunc configuration for Fluid Styled Content

This object is used to parse some content for stuff like special typo
tags, the [makelinks](https://docs.typo3.org/permalink/t3tsref:makelinks@main)-things and so on...

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

## Properties {#properties}

### externalBlocks {#externalblocks}

-   **externalBlocks**

    -   *Type:* list of tagnames / +properties

    This allows you to pre-split the content passed to parseFunc so that
    only content outside the blocks with the given tags is parsed.

    **Extra properties:**

    **.\[tagname\]** {

    -   **callRecursive:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). If set, the content of the block is
        directed into parseFunc again. Otherwise the content is passed
        through with no other processing than [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) (see below).
    -   **callRecursive.dontWrapSelf:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). If set, the tags of the
        block is *not* wrapped around the content returned from parseFunc.
    -   **callRecursive.alternativeWrap:** Alternative wrapping instead of
        the original tags.
    -   **callRecursive.tagStdWrap:** [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) processing of the block-tags.
    -   **stdWrap:** [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) processing of the whole block (regardless of
        whether callRecursive was set.)
    -   **stripNLprev:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). Strips off last line break of the previous
        outside block.
    -   **stripNLnext:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). Strips off first line break of the next
        outside block.
    -   **stripNL:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). Does both of the above.
    -   **HTMLtableCells:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). If set, then the content is expected
        to be a table and every table-cell is traversed.

    Below, "default" means all cells and "1", "2", "3", ... overrides
    for specific columns.

    -   **HTMLtableCells.\[default/1/2/3/...\]** {

        -   **callRecursive:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). The content is parsed through current
            parseFunc.
        -   **stdWrap:** [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) processing of the content in the cell.
        -   **tagStdWrap:** -> The `<TD>` tag is processed by [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main).
    -   **HTMLtableCells.addChr10BetweenParagraphs:** [boolean](https://docs.typo3.org/permalink/t3tsref:data-type-boolean@main). If set, then
        all appearances of `</P><P>` will have a `chr(10)` inserted between them.

    **Example**

    This example is used to split regular bodytext content so that tables
    and blockquotes in the bodytext are processed correctly. The
    blockquotes are passed into parseFunc again (recursively) and further
    their top/bottom margins are set to 0 (so no apparent line breaks are
    seen)

    The tables are also displayed with a number of properties of the cells
    overridden

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    tt_content.text.20.parseFunc.externalBlocks {
      blockquote.callRecursive = 1
      blockquote.callRecursive.tagStdWrap.HTMLparser = 1
      blockquote.callRecursive.tagStdWrap.HTMLparser {
        tags.blockquote.fixAttrib.style.list = margin-bottom:0;margin-top:0;
        tags.blockquote.fixAttrib.style.always = 1
      }
      blockquote.stripNLprev = 1
      blockquote.stripNLnext = 1

      table.stripNL = 1
      table.stdWrap.HTMLparser = 1
      table.stdWrap.HTMLparser {
        tags.table.overrideAttribs = border="0" style="margin-top: 10px;"
        tags.tr.allowedAttribs = 0
        tags.td.overrideAttribs = class="table-cell" style="font-size: 10px;"
      }
    }

    ```

### short {#short}

-   **short**

    -   *Type:* *(array of strings)*

    If this property is set, you can replace a char or word
    in your text with the value of the according constant.

    **Example**

    This replaces all occurrences of "T3" with "TYPO3 CMS"
    and "T3web" with a link to typo3.org.

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    page.10 = TEXT
    page.10.value = Learn more about T3, look here: T3web
    page.10.parseFunc.short {
      T3 = TYPO3 CMS
      T3web = <a href="https://typo3.org">typo3.org</a>
    }
    # Output: Learn more about TYPO3 CMS, look here: <a href="https://typo3.org">typo3.org</a>

    ```

### plainTextStdWrap {#plaintextstdwrap}

-   **plainTextStdWrap**

    -   *Type:* [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    This is [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main) properties for all non-tag content.

### userFunc {#userfunc}

-   **userFunc**

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

    > [!IMPORTANT]
    > <!-- TODO: no Markdown rendering for "versionchanged" -->
    >
    > PHP functions called via TypoScript must now use the PHP
    > attribute #[AsAllowedCallable]
    > (\TYPO3\CMS\Core\Attribute\AsAllowedCallable).

    This passes the non-tag content to a function of your own choice.
    Similar to, for example, [](https://docs.typo3.org/permalink/t3tsref:stdwrap-postuserfunc@main) in [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main),
    or [typolink.userFunc](https://docs.typo3.org/permalink/t3tsref:typolink-userfunc@main).

### nonTypoTagStdWrap {#nontypotagstdwrap}

-   **nonTypoTagStdWrap**

    -   *Type:* [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    Like [plainTextStdWrap](https://docs.typo3.org/permalink/t3tsref:parsefunc-plaintextstdwrap@main). Difference:

    `parsefunc-plainTextStdWrap` works on ALL non-tag pieces in the
    text. [nonTypoTagStdWrap](https://docs.typo3.org/permalink/t3tsref:parsefunc-nontypotagstdwrap@main) is post processing of all text
    (including tags) between special TypoTags
    (unless `breakoutTypoTagContent` is not set for the TypoTag).

### nonTypoTagUserFunc {#nontypotaguserfunc}

-   **nonTypoTagUserFunc**

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

    > [!IMPORTANT]
    > <!-- TODO: no Markdown rendering for "versionchanged" -->
    >
    > PHP functions called via TypoScript must now use the PHP
    > attribute #[AsAllowedCallable]
    > (\TYPO3\CMS\Core\Attribute\AsAllowedCallable).

    Like [userFunc](https://docs.typo3.org/permalink/t3tsref:parsefunc-userfunc@main).
    Differences is (like [nonTypoTagStdWrap](https://docs.typo3.org/permalink/t3tsref:parsefunc-nontypotagstdwrap@main))
    that this is post processing of all content pieces around TypoTags while
    `userFunc` processes all non-tag content.
    (Notice: `breakoutTypoTagContent` must be set for the TypoTag
    if it's excluded from `nonTypoTagContent`).

### makelinks {#makelinks}

-   **makelinks**

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

    Convert web addresses prefixed with `http://` and mail addresses
    prefixed with `mailto:` to links.

    See [makelinks](https://docs.typo3.org/permalink/t3tsref:makelinks@main) for additional properties.

### tags {#tags}

-   **tags**

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

    Here you can define **custom tags** that will parse the content to
    something.

### allowTags {#allowtags}

-   **allowTags**

    -   *Type:* list of strings or "\*"
    -   *Default:* Empty

    <!-- TODO: no Markdown rendering for "versionchanged" -->

    lib.parseFunc.allowTags and lib.parseFunc_RTE.allowTags do not contain
    default values anymore. HTML sanitization is continued to be  handled by
    the htmlSanitizer.See also: Breaking: #107438 - Default parseFunc configuration for Fluid Styled ContentHTML sanitization is handled by the htmlSanitizer in general. `allowTags`
    and `denyTags` can be used to further limit the allowed HTML tags.

    List of tags, which are allowed to exist in code, use "\*" for all.
    Security aspects are considered automatically by the HTML sanitizer,
    unless `htmlSanitize` is disabled explicitly.

    If a tag is found in `allowTags`, the corresponding tag in
    [denyTags](https://docs.typo3.org/permalink/t3tsref:parsefunc-denytags@main) is ignored!

    **Example**

    The example allows any tag, except `<u>` which will be encoded:

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    10 = TEXT
    10.value = <p><em>Example</em> <u>underlined</u> text</p>
    10.parseFunc = 1
    10.parseFunc {
      allowTags = *
      denyTags = u
    }

    ```

    **Migration**

    If you need to allow specific HTML tags, fully configure the allowTags option
    without relying on prior default configuration:

    ```diff
    - lib.parseFunc_RTE.allowTags := addToList(wbr)
    + lib.parseFunc_RTE.allowTags = b,span,i,em,wbr..
    ```

### denyTags {#denytags}

-   **denyTags**

    -   *Type:* list of strings

    List of tags, which may **not** exist in code! (use `*` for all.)

    Lowest priority: If a tag is **not** found in [allowTags](https://docs.typo3.org/permalink/t3tsref:parsefunc-allowtags@main),
    `denyTags` is checked.
    If denyTags is not `*` and the tag is not found in the list, the tag may exist!

    **Example**

    This allows `<b>`, `<i>`, `<a>` and `<img>` -tags to exist:

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    tt_content.text.20.parseFunc {
      allowTags = b,i,a,img
      denyTags = *
    }

    ```

### if {#if}

-   **if**

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

    if "if" returns false, the input value is not parsed, but returned
    directly.

## Example {#example}

This example takes the content of the field "bodytext" and parses it
through the [makelinks](https://docs.typo3.org/permalink/t3tsref:parsefunc-makelinks@main)-functions and substitutes all
`<LINK>` and `<TYPOLIST>`-tags with something else.

**EXT:site_package/Configuration/Sets/Main/setup.typoscript**

```typoscript
tt_content.text.default {
  20 = TEXT
  20.stdWrap.field = bodytext
  20.stdWrap.wrap = | <br>
  20.stdWrap.brTag = <br>
  20.stdWrap.parseFunc {
    makelinks = 1
    makelinks.http.keep = path
    makelinks.http.extTarget = _blank
    makelinks.mailto.keep = path
    tags {
      link = TEXT
      link {
        stdWrap.current = 1
        stdWrap.typolink.extTarget = _blank
        stdWrap.typolink.target = {$cLinkTagTarget}
        stdWrap.typolink.wrap = <p style="color: red; font-weight: bold;">|</p>
        stdWrap.typolink.parameter.data = parameters : allParams
      }

      typolist < tt_content.bullets.default.20
      typolist.trim = 1
      typolist.field >
      typolist.current = 1
    }
  }
}

```
