Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Editor > special character and html problem

Answered special character and html problem

Feed from this thread
  • Di avatar

    Posted on Feb 3, 2012 (permalink)

    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++;
    }


    Reply

  • Di avatar

    Posted on Feb 6, 2012 (permalink)

    any idea?

    Reply

  • Answer Rumen Rumen admin's avatar

    Posted on Feb 7, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Editor > special character and html problem
Related resources for "special character and html problem"

ASP.NET Editor Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]