Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/chart_template_guide/function_list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ The following type conversion functions are provided by Helm:
- `toStrings`: Convert a list, slice, or array to a list of strings.
- `toJson` (`mustToJson`): Convert list, slice, array, dict, or object to JSON.
- `toPrettyJson` (`mustToPrettyJson`): Convert list, slice, array, dict, or
object to indented JSON.
object to indented JSON with HTML characters unescaped.
- `toRawJson` (`mustToRawJson`): Convert list, slice, array, dict, or object to
JSON with HTML characters unescaped.
- `fromYaml`: Convert a YAML string to an object.
Expand Down Expand Up @@ -749,7 +749,9 @@ The above returns JSON string representation of `.Item`.
### toPrettyJson, mustToPrettyJson

The `toPrettyJson` function encodes an item into a pretty (indented) JSON
string.
string with HTML characters (`&`, `<`, `>`) preserved. This means URLs and
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Based on PR #31964 which overrides toPrettyJson and mustToPrettyJson in the engine FuncMap to use json.Encoder with SetEscapeHTML(false), preserving &, <, > characters literally instead of HTML-escaping them to Unicode sequences.
View source

other strings containing these characters will render correctly without
escaping them to `\u0026`, `\u003c`, `\u003e`.

```
toPrettyJson .Item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ The following type conversion functions are provided by Helm:
- `toStrings`: Convert a list, slice, or array to a list of strings.
- `toJson` (`mustToJson`): Convert list, slice, array, dict, or object to JSON.
- `toPrettyJson` (`mustToPrettyJson`): Convert list, slice, array, dict, or
object to indented JSON.
object to indented JSON with HTML characters unescaped.
- `toRawJson` (`mustToRawJson`): Convert list, slice, array, dict, or object to
JSON with HTML characters unescaped.
- `fromYaml`: Convert a YAML string to an object.
Expand Down Expand Up @@ -745,7 +745,9 @@ The above returns JSON string representation of `.Item`.
### toPrettyJson, mustToPrettyJson

The `toPrettyJson` function encodes an item into a pretty (indented) JSON
string.
string with HTML characters (`&`, `<`, `>`) preserved. This means URLs and
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Citation: Based on PR #31964 which overrides toPrettyJson and mustToPrettyJson in the engine FuncMap to use json.Encoder with SetEscapeHTML(false), preserving &, <, > characters literally instead of HTML-escaping them to Unicode sequences.
View source

other strings containing these characters will render correctly without
escaping them to `\u0026`, `\u003c`, `\u003e`.

```
toPrettyJson .Item
Expand Down
Loading