clang::mrdocs::safeString

Create a wrapper for a safe string.

Synopsis

Declared in <mrdocs/Dom/Value.hpp>

Value
safeString(std::string_view str);

Description

This string wrapper prevents the string from being escaped when the template is rendered.

When a helper returns a safe string, it will be marked as safe and will not be escaped when rendered. The string will be rendered as if converted to a dom::Value and rendered as‐is.

When constructing the string that will be marked as safe, any external content should be properly escaped using the escapeExpression function to avoid potential security concerns.

Return Value

The safe string wrapper

Parameters

Name

Description

str

The string to mark as safe

See Also

https://handlebarsjs.com/api‐reference/utilities.html#handlebars‐safestring‐string

Created with MrDocs