How to add a line break in Request note using addRequestNote method?

Document ID : KB000097756
Last Modified Date : 24/05/2018
Show Technical Document Details
Introduction:
When adding a note using "addRequestNote" method, the HTML code will not be formatted properly using plain text, causing line breaks won't appear on Catalog's UI.
Question:
How to add a line break in Request note using "addRequestNote" method?
Environment:
Service Catalog 14.1, 17.0 and 17.1
Answer:
In order to add HTML tags to the notes, the text must be introduced using CDATA structure as follow:

<sessionID xsi:type="xsd:string">?</sessionID>
<requestID xsi:type="xsd:int">?</requestID>
<noteText xsi:type="xsd:string"><![CDATA[<html>Line1.</br>New Line after break.</html>]]></noteText>
<noteType xsi:type="xsd:int">?</noteType>

The result of this on Catalog's UI will be:

"Line1.
New Line after break."