This project is read-only.

Problem with format text in comment Content

Topics: ASP.NET 2.0
Jun 29, 2011 at 4:06 AM
Edited Jun 29, 2011 at 4:06 AM

when i type: "té đi em" it become "t&#233; đi em"<--- how can i fix it?

Jun 29, 2011 at 10:19 AM

I'm having the same problem in BE 2.5. Any comment with a quote shows the escape sequence characters. For example: This is a &quot;test&quot;

This occurs in preview as well as live comments.

Jun 29, 2011 at 11:09 AM

Thats a know issue.
Please see this issue in the Issue Tracker section.


Jun 29, 2011 at 8:30 PM

For security reasons, comment output is always html encoded. This might cause issues with special characters as in your case. Removing encoding will sure fix formatting, but also will open door for XSS - we might need to figure a way to keep it secure and handle special cases at the same time.

Jun 29, 2011 at 8:54 PM

This has been fixed in  This was a bug as we were HTML encoding the content more than once (multiple times).  Every time the post would get updated or re-saved, etc. it would get re-encoded leading to markup like:  &amp;amp;amp;amp;amp;

BlogEngine.NET 2.5 on the Downloads tab has been updated to this v2.5.0.6.  If you already have BE, the files to update are (a) The BlogEngine.Core DLL files for the BIN directory and (b) admin/AjaxHelper.aspx.cs (this last one is optional).

Any existing comments you have that have been multi-encoded like this will not be fixed by this update.  This fixes new comments going forward.  To fix old comments, you would need to go into the data store and remove the extra, multiple encodings.

Jun 30, 2011 at 6:35 AM
rtur wrote:

...we might need to figure a way to keep it secure and handle special cases at the same time.

The only chars you have to encode for security reasons ar <, > and the &.
May a single methode in the Utils class could solve this issue.
BE serves the content as utf-8 encoded XML. So only a very rare use of HTMl encoding is needed for very special signs.

Looking forward to test the new version this weekend.


Jun 30, 2011 at 7:14 AM

Thanks BenAmada and klaus_b. Both your replies helped. I appreciate the quick response!

Jul 1, 2011 at 4:01 AM

FYI, the comments don't need to be modified down in the datastore. The comments view in the admin section allows you to edit the comments.