[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [view](../README) / safe

# Function: safe()

> **safe**(`html`): [`SafeHtml`](../classes/SafeHtml)

Defined in: [packages/core/src/view/index.ts:62](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/view/index.ts#L62)

Wrap a pre-rendered HTML string as SafeHtml so it passes through
renderChildren() without being escaped again.

Use when you have HTML that was produced outside JSX (e.g. a Markdown
renderer) and you want to embed it safely into a JSX tree.

## Parameters

### html

`string`

## Returns

[`SafeHtml`](../classes/SafeHtml)

## Example

```ts
import { safe } from '@zerotal/core';
<article>{safe(markdownToHtml(post.body))}</article>
```
