---
title: "sanitize user input · RUAL Documentation"
description: "Sanitizes the input and returns the text without an element wrapper if no attributes or outlet are set. If either one is set the text will be wrapped wi…"
canonical: https://docs.rual.nl/block-types/Component%20UI/component_sanitize_user_input
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# sanitize user input

This block is part of the [`Component UI`](https://docs.rual.nl/block-types/Component%20UI) group and was last modified in core [`v12.0.5`](https://docs.rual.nl/core-versions/120005).

Sanitizes the input and returns the text without an element wrapper if no attributes or outlet are set. If either one is set the text will be wrapped with a span

- value required `uicomponent`

- allowed tags `array` Given tags will be allowed in the user input (example: div, p)

- allowed attributes `array` Given attributes will be allowed in the user input (example: style, id)

- uicomponent `uicomponent`

A typical wiring for [sanitize user input](https://docs.rual.nl/block-types/Component%2520UI/component_sanitize_user_input): the `uicomponent` out pin feeds [build PDF](https://docs.rual.nl/block-types/files/file_generate_pdf).

[![Studio canvas example for the sanitize user input block: typical wiring for sanitize user input.](https://docs.rual.nl/canvas-examples/component_sanitize_user_input.png)](https://docs.rual.nl/canvas-examples/component_sanitize_user_input.png?v=3)

## Version history

Introduced in [`v12.0.5`](https://docs.rual.nl/core-versions/120005).

- [Back to `Component UI`](https://docs.rual.nl/block-types/Component%20UI): Return to the main group to view all sub-groups

- [Back to `typography`](https://docs.rual.nl/block-types/Component%20UI?group=typography): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
