---
title: "Format.htmlspecialchars ViewHelper <f:format.htmlspecialchars>"
manual: "Fluid ViewHelper Reference"
version: "14.3"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-format-htmlspecialchars@14.3"
source: "Global/Format/Htmlspecialchars.rst"
rendered: "2026-10-01T16:43:06+00:00"
---

# Format.htmlspecialchars ViewHelper `<f:format.htmlspecialchars>` {#typo3fluid-fluid-format-htmlspecialchars}

Applies PHP `htmlspecialchars()` escaping to a value.

See [http://www.php.net/manual/function.htmlspecialchars.php](http://www.php.net/manual/function.htmlspecialchars.php)

Go to the source code of this ViewHelper: [Format\\HtmlspecialcharsViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/Format/HtmlspecialcharsViewHelper.php).

## Arguments of the `<f:format.htmlspecialchars>` ViewHelper {#typo3fluid-fluid-format-htmlspecialchars-arguments}

-   **doubleEncode**

    -   *Type:* boolean
    -   *Default:* true

    If false, html entities will not be encoded

-   **encoding**

    -   *Type:* string
    -   *Default:* 'UTF-8'

    Encoding

-   **keepQuotes**

    -   *Type:* boolean
    -   *Default:* false

    If true quotes will not be replaced (ENT_NOQUOTES)

-   **value**

    -   *Type:* string

    Value to format
