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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Textbox Is Not Properly Encoding Escape Characters

Thread ID:





148998 Nov 11,2019 04:41 PM UTC Nov 12,2019 05:40 AM UTC Blazor 1
Tags: TextBox
Alex Jacobson
Asked On November 11, 2019 04:41 PM UTC


I have noticed that when I pass in strings to the multiline EjsTextBox, it renders newline characters as \n 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?

Saranya Dhayalan [Syncfusion]
Replied On 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, \n 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 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon