raw_html: Mark a string as raw HTML

View source: R/tags.R

raw_htmlR Documentation

Mark a string as raw HTML

Description

Wraps one or more character strings so that render() outputs them verbatim, without escaping HTML special characters.

Usage

raw_html(...)

Arguments

...

Character strings of raw HTML /// Optional.

Details

This is useful for injecting pre-rendered HTML, inline ⁠<script>⁠/⁠<style>⁠ blocks, SVG markup, or any content that should not be entity-escaped.

Value

A character vector of class "hypertext.raw".

Examples

raw_html("<script>alert('hi')</script>")
render(tags$div(raw_html("<em>already formatted</em>")))

hypertext documentation built on April 18, 2026, 1:06 a.m.