special character and html problem

3 posts, 1 answers
  1. Di
    Di avatar
    4 posts
    Member since:
    Nov 2011

    Posted 03 Feb 2012 Link to this post

    This is my radedtor code.  when I enter this content : "İÖÜÇŞĞ ! + = . ; :"
    result is : %3cspan style%3d%22font-family%3a arial%3b font-size%3a 13px%3b%22%3e%3cstrong%3eİÖÜÇŞĞ %21 %2b %3d . %3b %3a%3c/strong%3e%22 %3c/span%3e
    how can fix this? I double checked all pages and config files. tryed many combination of content filters. what is wrong?

    Editor Code :
    Input : "İÖÜÇŞĞ ! + = . ; :"
    Telerik.Web.UI.RadEditor RadControlWrite = new Telerik.Web.UI.RadEditor();
                RadControlWrite.ContentFilters = EditorFilters.DefaultFilters;
                RadControlWrite.DisableFilter(EditorFilters.ConvertCharactersToEntities);
                RadControlWrite.Width = 450;
                RadControlWrite.Height = 150;
                RadControlWrite.AutoResizeHeight = true;
                RadControlWrite.ToolsFile = "~/Manage/ResourceToolbar.xml";
                RadControlWrite.CssFiles.Clear();
                RadControlWrite.CssFiles.Add(new EditorCssFile("~/App_Themes/" + ConfigurationManager.AppSettings["Default_Theme"].ToString() + "/typography.css"));
                RadControlWrite.ToolbarMode = Telerik.Web.UI.EditorToolbarMode.Default;
                RadControlWrite.EditModes = EditModes.All;
                RadControlWrite.ID = "RadEditor" + IDCount.ToString();
                if (Object.Equals(SecondRadControl, null)) { SecondRadControl = RadControlWrite; } else { RadControlWrite.ToolProviderID = SecondRadControl.ID; }
     
                // Custom Translater Tool -----------------
                EditorToolGroup RadControlToolGroup = new EditorToolGroup();
                EditorDropDown TranslateDropDown = new EditorDropDown("TranslateTool");
                TranslateDropDown.Items.Add(new EditorDropDownItem("Türkçe","tr"));
                TranslateDropDown.Items.Add(new EditorDropDownItem("English","en"));
                RadControlToolGroup.Tools.Add(TranslateDropDown);
                RadControlWrite.Tools.Add(RadControlToolGroup);
     
                phResourceEditor.Controls.Add(RadControlWrite);

    Saving Function
    Output :   

    Request.Form[string.Format("ctl00$ManageMasterContent$RadEditor{0}", IDCount)].ToString() 

    "%3cspan style%3d%22font-family%3a arial%3b font-size%3a 13px%3b%22%3e%3cstrong%3eİÖÜÇŞĞ %21 %2b %3d . %3b %3a%3c/strong%3e%22 %3c/span%3e" string
    int IDCount = 1;
    foreach (System.Collections.Generic.KeyValuePair<string, string> ResourceDictionaryEntry in ResourceItems)
    {
        RW.AddResource(ResourceDictionaryEntry.Key.ToString(), Request.Form[string.Format("ctl00$ManageMasterContent$RadEditor{0}", IDCount)].ToString() /** Important : if masterpage chanced this value can be null **/ );
        IDCount++;
    }


  2. Di
    Di avatar
    4 posts
    Member since:
    Nov 2011

    Posted 06 Feb 2012 Link to this post

    any idea?
  3. Answer
    Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 07 Feb 2012 Link to this post

    Hello,

    Could you please explain why do you need to obtain the editor's content via the Request.Form? This approach is not recommended and the proper way is to use the RadEditor1.Content property.

    You can find information about your scenario in the following forum thread: Encoding the Html on the client.


    All the best,
    Rumen
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top