Adding & (\u0026) to special characters

2 posts, 0 answers
  1. Casey
    Casey avatar
    19 posts
    Member since:
    May 2011

    Posted 29 Mar 2012 Link to this post

    I have a radeditior on my page with a custom list of characters. I am having problems adding the & symbol to the symbols list. The space in the list where the & should show up appears blank. Please see the attached screenshot. The blank space (which appears gray because it is selected) after the percent sign should be where the & symbol appears. I have tried adding it by
    editor.Symbols.Add("&")
     And by
    editor.Symbols.Add("\u0026")

    And receive the same results. Does anyone have any idea why this would happen?

    Thanks!
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 02 Apr 2012 Link to this post

    Hi Casey,

    After examine the case, I was able to reproduce the described behavior only under InternetExplorer version prior 9. Could you please verify that is the case for you?

    It seems that the ampersand symbol is not properly converted into HtmlEntity under IE and that is why it is not rendered inside the dropdown. I have logged this issue into our database and we will do our best to have it fixed as soon as possible. For the time being you can use the following workaround:
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="editorLoad">
    </telerik:RadEditor>
     
    <script type="text/javascript">
        function editorLoad(editor)
        {
            var symbols = editor.get_symbols();
            for (var i = 0; i < symbols.length; i++) {
                if (symbols[i] == "&")
                    symbols[i] == "&";
            }
        }
    </script>

    I hope this helps.

    Greetings,
    Dobromir
    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