tags:

views:

362

answers:

2

I have integrated ckeditor into a MVC asp.net project. My problem is that the input is encoded back to the controller and then when redisplayed in a view the contents contain the encoded characters & html tags.

How do I show the inner html and still have the text encoded.

Any suggestions would be appreciated.

+1  A: 

What are you using to render the textarea? If you are using an Html helper (like Html.Textarea for instance), the encoding is done automatically.

Therefore, if you are using a RTE like CKEditor or TinyMCE, you probably don't want that. So, just write out a textarea by hand in the view, or better yet write your own Textarea extension method to limit/eliminate the encoding.

mgroves
A: 

Thanks for your answerer. I have already tried that, also experimented with htmlagility pack to filter out tags. Getting a handle on this but it has been time consuming and painfull.