This is a migrated thread and some comments may be shown as answers.

No quotes in hyperlink properties using Hyperlink Manager

1 Answer 94 Views
Editor
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 24 Jan 2012, 12:36 AM
I have noticed when using the Hyperlink Manger to create links in the RadEditor, that if you only enter 1 word in the Tooltip field, that the rendered HTML does not include either single or double quotes around the text for the title parameter in the anchor tag. However, if you enter multiple words it does include double quotes.

Likewise, it does the same thing in the target field.

Adding links produces the following HTML in the editor control for single and multiple words:

<A title=MSN href="http://www.msn.com" target=_blank>MSN</A><BR>
<A title="MSN WEB SITE" href="http://www.msn.com" target=_blank>MSN Web Site<BR></A>

The problem I am having is that when trying to render these anchors in an HtmlTextBox in the ReportViewer control, it complains about the missing quotes giving the following error message:

An error has occurred while processing HtmlTextBox 'txtBestDomainPractice': 'MSN' is an unexpected token. The expected token is '"' or '''. Line 1, position 122.

It does this for the title field if they are missing there, or for the target field if the title field has quotes.

Is there a workaround or known fix for this?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 24 Jan 2012, 12:37 PM
Hi,

This is IE browser behavior which is handled by the ConvertToXhtml filter of RadEditor. It seems that you have disable it on purpose and if you do not like to enable it, you can handle the OnClientPasteHtml event of RadEditor and ensure that the returned by the Link manager content has quotes before it is inserted in the content area.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
David
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or