Client-side API: setting title/url gets URL encoded

2 posts, 0 answers
  1. Adam
    Adam avatar
    2 posts
    Member since:
    Mar 2014

    Posted 10 Apr 2014 Link to this post

    When I use the client side API to set the title and URL of my page to be shared, my page title gets URL encoded:

    1.function OnSocialButtonClicking(sender, args) {
    2.var url =  ""
    3.var title = "test test test test test test"
    4.args.set_stringsToShare(url, title)

    the tweet message comes out URL encoded: "test%20test%20test%20test%20test%20test"

    is there a way around this? It happens on pinterest, facebook too
  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 15 Apr 2014 Link to this post

    Hi Adam,

    Setting the parameters to the sender, seems to fixes the issue on my side. For example:
        function OnSocialButtonClicking(sender, args) {
            var url = "";
            var title = "test test test test test test";
            sender.set_stringsToShare(url, title);
    <telerik:RadSocialShare ID="RadSocialShare1" runat="server" OnSocialButtonClicking="OnSocialButtonClicking">
            <telerik:RadSocialButton SocialNetType="ShareOnTwitter" TitleToShare="my title" UrlToShare="" />

    Danail Vasilev

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top