html encode

9 posts, 1 answers
  1. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 25 Feb 2013 Link to this post

    Hello,
    when editing inline in grid,or any other mode batch if i enter something that looks like a html code,it gives me a error regardin dangerous input request.So my question is how can i encode this inputs,to be able to save values  something like <T>,<kk> and avoid dangerous inputs ?

    Regards,
    Daniel
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 26 Feb 2013 Link to this post

    Hi Daniel,

     
    I would suggest to disable the input validation on the controller action using the ValidateInput attribute and handle the HTML encoding manually. Please check the example below:

    [ValidateInput(false)]
    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Update([DataSourceRequest] DataSourceRequest request, Order order)
    {
    Kind regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 27 Feb 2013 Link to this post

    i noticed that the gridColumn has some Encode method,and by default is true.this applies to inputs in the grid?
    can i see some documentation regarding this?
    also the column i saw that has a lot of templates methods like .Template, .EditorTemplateName,.EditorViewData,.ClientTemplate,.HeaderTemplate,FooterTemplate,GroupHeaderTemplate,GroupFooterTemplate and so on.is there some documentation and some examples to see how can i work with this methods?

    regards,
    Daniel
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 27 Feb 2013 Link to this post

    Hi Daniel,

     
    More information about these methods can be found in the Grid documentation, GridBoundColumnBuilder article.

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 27 Feb 2013 Link to this post

    i Found it,but no examples are shown for this methods,to see how to create such a template,when using razor and how many methods are to create a template.

  6. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 01 Mar 2013 Link to this post

    Hi Daniel,

     
    These methods are using KendoUI template syntax - for more information how to use them you check this article.

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  7. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 01 Mar 2013 Link to this post

    ok,but with razor syntax there is no documentation? how can i use mvc wrappers with this templates?in some online examples i saw that you use templates using methods for grid like  .ClientTemplateId, .Template,or .ClientTemplate with razor code,it would be nice to have this documented,because i keep seeing javascript documentation,but i am using mvc wrappers,so it should be a mvc documentation.
    The whole purpose to use kendo ui for me was because of Kendo ui Complete for MVC,which means for me,that it's has everything adapted to mvc ,so wrappers in razor engine,and documentation for that.

    Regards
  8. Answer
    Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 05 Mar 2013 Link to this post

    Hi Daniel,


    Please check the below examples of using the Template, ClientTemplate and ClientTemplateId methods which contains Razor code:

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  9. Daniel
    Daniel avatar
    192 posts
    Member since:
    Mar 2012

    Posted 05 Mar 2013 Link to this post

    ok,thank you.i hope some day there will be a more organized and comprehensive documentation just like for Rad Ajax controls.

    Best Regards,
    Daniel
Back to Top