We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Textbox Is Not Properly Encoding Escape Characters


I have noticed that when I pass in strings to the multiline EjsTextBox, it renders newline characters as instead of creating an actual newline. I tried to manually encode my strings with HtmlEncoder, but then it just shows the literal hex codes. This does not happen when I use the InputTextArea component--it appears to encode things properly by default--and I've had to start using that one in my website. I couldn't find any direction about this on the docs. Is this a known issue? Is there a way to get the encoding to work that I don't know about?

1 Reply

SD Saranya Dhayalan Syncfusion Team November 12, 2019 05:40 AM UTC

Thank you for contacting Syncfusion support 
We have checked your reported issue and we would like to let you know that it is a known issue and we have already fixed and included in our version ( So, we would suggest you update the latest Nuget packages and use the updated script file to resolve this issue in your end. Please find the links below. 
JS file Links:  
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.26/material.css" rel="stylesheet" /> 
    <script src="https://cdn.syncfusion.com/ej2/17.3.26/dist/ej2.min.js"></script> 
    <script src="https://cdn.syncfusion.com/ej2/17.3.26/dist/ejs.interop.min.js"></script> 
Please find the below code snippet for your reference, 
<EjsTextBox Multiline=true Placeholder="Enter your address" Value=@Val></EjsTextBox> 
@code { 
      public string Val = "Mr. Dodsworth Dodsworth, System Analyst, Studio 103"; 
For your convenience, we have prepared a sample. Please find the sample link: 
Could you please check the above sample and get back to us, if you need any further assistance on this? 
Saranya D 

Live Chat Icon For mobile
Up arrow icon