The appearence of some special character in the user's information in Customtable

Ha Son Nguyen Tat asked on October 4, 2017 12:16

Hi Kentico Technicals,

We've gotten a strange thing that After we've completely taken the information to be entered from user, we parsed this information to JSON object and saved in Customtable. However, the saving process has finished, we viewed record in Customtable and we found some special character appeared in JSON object string to be saved to Customtable.

So, we have a question for guys: Do the Customtable affect and make some special character to be displayed in JSON object string to be saved to Customtable? If the main cause is not from Customtable, Is it may be from process of parsing information to JSON object?

Strange_Logging
Thanks you so much for your support.!

Recent Answers


Trevor Fayas answered on October 4, 2017 14:09

These characters are new lines (encoded) usually from a text area control. When you parse the user input, can you run it through a regex replace method? It's an easy way to clean it up, if you Google ".net removed non alpha numeric" you should get there method.

1 votesVote for this answer Mark as a Correct answer

Ha Son Nguyen Tat answered on October 5, 2017 08:21 (last edited on October 5, 2017 08:22)

Hi @Trevor Fayas,

In application form, I did use textbox (.NET control), not use a text area control, but it still appeared some special character (encode character) as my mentioned problem.
May be, Are These characters also new lines (encoded) usually from a textbox (.NET control)?

Could you give your answer for the above my question to help me more understanding of original problem?

Thanks for your recommendation, we also thought to the solution to be the same as your solution.



Thanks you so much.!

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on October 5, 2017 15:54

If it's just a standard text box, what could be happening is the user entering in the value could be copying and pasting, and it's carrying the new line.

But to answer the specific question, there is nothing inheritly in Custom Tables that would append a new line. Were you able to replicate this continually? If you enter in a value (typing it in), are the special characters there?

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.