---
url: "https://vueda.dev/v3/reference/api/js/utils/html.md"
title: "utils/html"
---

# utils/html

## Overview

Utilities for sanitizing and detecting HTML in user-supplied strings.

## Properties

### tagRegex {#tagRegex}

Type: `RegExp`

Source: `client/lib/utils/html.js:54`

## Methods

- [containsHtml](/v3/reference/api/js/utils/html/functions/containsHtml.md) - Tests whether a string contains any HTML tags.
- [sanitizeMessage](/v3/reference/api/js/utils/html/functions/sanitizeMessage.md) - Sanitize a message to prevent XSS attacks.
- [sanitizeMessages](/v3/reference/api/js/utils/html/functions/sanitizeMessages.md) - Sanitize messages to prevent XSS attacks.

## Source

`client/lib/utils/html.js:1`
