[Expression Widget] How to concatenate a dynamic variables (String) into code HTML?

Hi guys,


I want to pass dynamic variable (String) into a tag in code HTML but the Html is not rendered. The goal is to send an email with code HTML.

Into Expression Widget:
1) I used theEncodehtml() function (Value property) with code HTML and the String (dynamic varible),
2) I set the property Escape Content = No.
3) I concatenated the  <head>Header</head> + <body> Static Body + Dynamic string </body>+ <footer> Footer</footer>.

How to concatenate a dynamic variables (String)  into a tag in code HTML using Expression?

Can someone help me?  Please
Thanks

Solution


Hi Juan,


It's necessary to creat an Action the join the code HTML with your variable in a unique variable (Example: FinalString).

In the Expression Widget(Escape Content = NO), you set the Value with function SanitizeHtml(FinalString) of Sanitization Extension.


I had a similar case in past, so i share the link:

https://www.outsystems.com/forums/discussion/46385/how-to-concatenate-a-string-to-html-string/


I Hope I had helped.

Regards

Solution

Diego Souza wrote:


Hi Juan,


It's necessary to creat an Action the join the code HTML with your variable in a unique variable (Example: FinalString).

In the Expression Widget(Escape Content = NO), you set the Value with function SanitizeHtml(FinalString) of Sanitization Extension.


I had a similar case in past, so i share the link:

https://www.outsystems.com/forums/discussion/46385/how-to-concatenate-a-string-to-html-string/


I Hope I had helped.

Regards

Thank you :D


Juan Ferreira wrote:

Diego Souza wrote:


Hi Juan,


It's necessary to creat an Action the join the code HTML with your variable in a unique variable (Example: FinalString).

In the Expression Widget(Escape Content = NO), you set the Value with function SanitizeHtml(FinalString) of Sanitization Extension.


I had a similar case in past, so i share the link:

https://www.outsystems.com/forums/discussion/46385/how-to-concatenate-a-string-to-html-string/


I Hope I had helped.

Regards

Thank you :D


Great, good job! :D

Regards