Skip to Main Content
HCL Domino Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Status Assessment
Workspace Domino Designer
Categories @Formulas
Created by Guest
Created on Nov 27, 2024

Add encoding @functions for custom HTML, XML and JSON

When building custom HTML, XML or JSON, there are a few character, that needs escaping.

@HTMLEncode

For doing HTML encoding, I use this to encode a text field/string:

text := "B&O";
_from := "&":"<":">":"\"":"'";
_to := "&amp;":"&lt;":"&gt;":"&quot;":"&#39;";
@ReplaceSubstring(text ; _from; _to)

It would be so much nicer, if I could write:

text := "B&O";
@HTMLEncode(text)

The output would be:

"B&amp;O" 

@XMLEncode

A little different for XML

_from := "&":"<":">":"\"":"'";
_to := "&amp;":"&lt;":"&gt;":"&quot;":"&apos;";
@ReplaceSubstring(text ; _from; _to)

Could become:
@XMLEncode(text)

@JSONEncode

_from := "\\":"\"":"/":"        ":@Newline;
_to := "\\\\":"\\\"":"\\/":"\\t":"\\n";
@ReplaceSubstring(text; _from; _to)

Please note that the second to last character in the _from list is a tab character.

Could become:

@JSONEncode(text)
  • Attach files