0

I have a basic form that asks the user to enter some text in a regular html input control and I am also using jquery-tokeninput to allow users to choose tags from a pre-filled list.

One of the tags in the pre-filled list happens to be the word café, which I have got from the server and populating the tag list by calling mytaglist.push({id: 'café', name: 'café'});

The problem is that when they attempt to enter a word like 'café' as a tag, asp.net mvc rejects the input saying that:

A potentially dangerous Request.Form value was detected from the client (articleTags="café").

Inspection using firebug shows my post data to be something like: UserName=neo&category=&Title=caf%C3%A9&Text=sometext&articleTags=caf%26%23233%3B&IsAgreedTerms=true

As you can see, Title has value caf%C3%A9 which is correct but articleTags has value caf%26%23233%3B which I was not expecting.

I absolutely need to make sure that café (and not some encoded value) appears on the screen.

How can I make sure that I send the correct post data and still display café everytime? Should I change how my server sends the text?

1 Answers1

0

sending the data via Html.Raw solves the problem..