I'm having an issue when using the RadMarkupDialog control where the & symbol is not being saved correctly. All other symbols seem to be encoded which is causing a problem.
Using the control, if I put the following in the markup section:
<span style="font-size: 16pt">Test of the & symbol. <br />Test of the < symbol.</span>When I click the Apply button and close the dialog, grabbing the Value (Dialog.value) gives me the following:
<html><span style="font-size: 16pt">Test of the & symbol. <br />Test of the < symbol.</span></html>
Hello, Steve,
I have attached my sample project and a gif file illustrating the steps that I performed for your reference.
Please give it a try and see how it would work on your end. If you are still experiencing any further difficulties, it would be greatly if you can specify what differs on your end and what steps I need to perform in order to replicate the undesired behavior that you are facing. Thus, we would be able to think about a suitable solution. Thank you in advance for your cooperation.
I am looking forward to your reply.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Hello, Steve,
After further investigating the HTML parsing, I can confirm that even though the Internet Explorer's engine is used internally, the obtained behavior is an issue with RadMarkupEditor because the value is simplified by replacing " " with " " and "&" with "&".
I have logged it in our feedback portal by creating a public thread on your behalf. You can track its progress, subscribe for status changes and add your comments on the following link - feedback item.
I have also updated your Telerik points.
Currently, the possible solution that I can suggest is to use reflection and extract the content from the HTMLView:
Dim dialog As RadMarkupDialog = New RadMarkupDialog()
Dim result As DialogResult = dialog.ShowDialog()
If result = DialogResult.OK Then
Dim fi As FieldInfo = GetType(RadMarkupEditor).GetField("htmlView", BindingFlags.NonPublic Or BindingFlags.Instance)
Dim tb As TextBox = TryCast(fi.GetValue(dialog.Editor), TextBox)
MessageBox.Show(tb.Text)
End IfI believe that it would be suitable for your scenario.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Hello, Steve,
Following the provided information, I have tested with the specified mark-up text and obtained the following result:
Indeed, the "&" text is replaced by the respective symbol "&". Our Markup Editor uses the rendering engine of Internet Explorer.
The easiest solution that I can suggest is to directly replace the "&" with the HTML equivalent.
Dim dr As DialogResult = Me.RadMarkupDialog1.ShowDialog()
If dr = Windows.Forms.DialogResult.OK Then
Dim text = Me.RadMarkupDialog1.Value.Replace(" & ", " & ")
Me.RadRichTextEditor1.Text = text
Me.RadTextBox1.Text = text
EnI hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik