RadMenu & Microsoft AntiXss 4.2.1

3 posts, 0 answers
  1. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 17 Jan 2012 Link to this post

    If I reference the AntiXss library (4.2.1) and then implement it through web config, e.g:
    <system.web>
        <httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary"/>
    </system.web>

    When rendered, the RadMenu presents all links as href="%23".

    How can I ensure RadMenu operates normally after adding AntiXss?

    Richard
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Jan 2012 Link to this post

    Hello Richard,

    The problem is not with RadMenu. You can test a regular HyperLink and its NavigateUrl value will also get corrupted:
    * * *
     
     <asp:HyperLink Text="aaaa" NavigateUrl="http://www.google.bg/" runat="server"></asp:HyperLink>
     
    * * *

    You can try to workaround the issue with the client API of RadMenu:
    <script type="text/javascript">
            function OnClientLoad(menu) {
                var items = menu.get_allItems();
                for (var i = 0; i < items.length; i++) {
                    var currentItem = items[i]
                    currentItem.set_navigateUrl(currentItem.get_navigateUrl());
                }       
            }
        </script>
        <telerik:RadMenu ID="RadMenu1" runat="server" OnClientLoad="OnClientLoad">


    Kind regards,
    Peter
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 22 Jan 2012 Link to this post

    It's a bug. Damn, there goes my AntiXss till they get a patch out :(

    Richard
Back to Top