DisplayAlertMessage shows HTML encoded characters

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi there,

I just wanted to share a little bug found in DisplayAlertMessage implementation (BaseNopFrontendUserControl).

Whenever DisplayAlertMessage is used to show an alert message on the client, if the message text has non-standard characters (such as accented ones) they are shown as HTML encoded.

For those who may be interested in this issue, I have solved changing the following line:

alertJsStart.AppendLine(string.Format("alert('{0}');", message));

to:

alertJsStart.AppendLine(string.Format("alert('{0}');", HttpUtility.HtmlDecode(message.Trim())));


Hope this helps!

Bye!
13 years ago
Thanks for info
13 years ago
Thank you very much! :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.