Hi,
We are using ultra desktop alert object in order to display a pop up message.
We transfer to a text property a formatted string with <p> tags and a content which we've got from the user.
Once the user enters a text, the message is displayed with the proper content (without the format tags)-
but once the user enters a characters which are part of html tags such as- <>, &, etc. the pop up message isn't properly displayed- contains the format tags and the user's content also.
How can we transfer the user's content as a literal string?
Hi maayan,
Welcome to our forums!
It looks like the user is allowed to type invalid sequence of characters according to your parser logic. In this case, you have to either display some sort of legend about the rules of formatting the text or improve your parser logic to consider more complicated use cases and normalize the user input.
Let me know if you need further assistance regarding this matter.
HI,
Thank you for the quick reply.
I am using the normal infragistic ultra desktop alert. I read in the internet that the ultra desktop alert use FormattedLinkEditor to display the text property.
Is there any way to specify to the editor what is text and what is tags? How can I display in the editor :
<p>"<text>"</p>
The desired result is that the user will see only "<text>".
Thanks,
Maayan
Hi Maayan,
In HTML, the way to escape and distinguish characters like “<, >, &” from the text itself is by using special escape code or entity name. More information about complete list of HTML Escape Characters can be found at http://www.theukwebdesigncompany.com/articles/entity-escape-characters.php
Furthermore, only very limited subset of HTML functionality is supported by the FormattedLinkEditor and therefore, it should not be considered as complete HTLM renderer. More information about the supported tags can be found at http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/WinFormattedLinkLabel_Formatting_Text_and_Hyperlinks.html
In order to accomplish the desired result, the valid HTML syntax should be:
"<p><text></p>"
Can you give me the complete list of escape characters for infragistic?
Mayyan
I tested in sample application using the UltraDesktopAlert’s text with the complete HTML escaping list referenced in the above post and it renders correctly for all symbols.
Can you please attached the code sample?
Yes, of course! Look at the attached sample and if you have any additional questions feel free to ask me.