OS info
- Operating System : Mac OSX 20.5.0
- Wappler Version : 3.9.9
Problem description
Creating an HTML email using HTML stored in a database by using “Set Value” steps.
However, when adding the various sections (HTML snippets) in the editor I select the format as HTML but it keeps reverting to Text so all the HTML code gets changed as escaped characters are added e.g.
div class="col num12"
becomes
div class=\"col num12\"
and spaces are removed etc.
If I change the editor back to HTML it displays correctly but when I save and leave, it gets reverted back to Text.
Steps to reproduce
-
Add a Set Value step and check the Output box to test.
-
Add some HTML code, edit the value (little pencil icon), select HTML (top right) and enter some HTML.
-
Save the Server Data Content window.
-
The Value appears correct in the properties window but when opening the API in the code editor, the HTML has been changed e.g.
<div class="col num12"></div>
becomes
<div class=\"col num12\"></div>
-
Run the API in Postman and the output of the Set Value appears with the escaped characters.
This breaks the final HTML output so it doesn’t display correctly.
Screenshot of Server Connect API with a simple Test Value:
The Server Data Connect editor window (with HTML type selected):
NOTE - if I go back into that screen after saving, Text type is displayed (not HTML)
The code behind that Test value:
The Postman Output when running the API:
Last updated: