No quotes in hyperlink properties using Hyperlink Manager

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Jul 2011

    Posted 23 Jan 2012 Link to this post

    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?
  2. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 24 Jan 2012 Link to this post

    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
Back to Top