Attached is the detail show the text in a regular textbox and in htmltextbox
6 Answers, 1 is accepted
Please double-check if the string set as HtmlTextBox.Value is escaped correctly. By design, the approach to work with the HtmlTextBox and escape HTML special characters would be to send the data (html code) to a user function which will escape the HTML special characters. You can also validate the passed value - XHTML Validation.
For more information on the above approach, please check the User Functions help article, as well as the HtmlEncode Method MSDN page.
I hope the provided information is helpful.
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
The HtmlTextBox is generating the error(i.e., An error occurred while parsing EntityName.) when we provide any string which contains any html tag.
Example: "Case: 97 | Part: Part A | Type: Single<br/>Domain: A-COMPCARE (1) | Subject: 11YO- Issues of foster care, possible abuse & psychiatric issues<br/>"
The provided HTML string is invalid as special characters like '&' are not escaped. Also the BR tag is not supported by the HtmlTextBox item. Please check the overview article for a list of the supported HTML elements and CSS attributes.
The best approach is to escape and modify the string in a user function before passing as an HtmlTextBox.Value.
In C# use:
value = WebUtility.HtmlEncode(text);