Error rendering '&' in telerik html text box

How can I handle the ampersand character ("&") in the Telerik HTML text box? During rendering this gives me an error. Also, does anyone know of any other character that might cause errors in the HTML text box?

+5
source share
1 answer

Ampersand is a special character in HTML that indicates the start of an escape sequence (so you can do something like ©to get a copyright character, etc.). If you want to display an ampersand, you need to avoid it. Therefore, if you replace all ampersands with &, this should take care of the error.

However, if at your input there were ampersands that were already escaped - for example, perhaps your data had ©- you will not want to avoid this ampersand. But if your data will not contain any of these ampersands, a simple replacement should be good.

You also need to replace the <> characters &lt;with a larger and smaller character (> and <).

Telerik / http://www.telerik.com/help/reporting/report-items-html-text-box.html

HTML ( XML ) "&" , "<" " > " ( ), , . , "&" "&" . w3.org.

+7

All Articles