开发者

GWT Escape Special Character

I am using GWT and java and h开发者_如何学Goibernate on the server. How can I escape characters on java on the server??


Are you looking for PreparedStatement?

See; How to capture/encode special character for SQL Server in java app?


Where are you trying to escape special characters? Static strings? XML or JSON? Some sample code would make it a lot easier to answer this question.


On the server side you are in a standard Java environment, so you can basically use whatever you like and fits best to your need. For XML for example there is "atlassian-xml-cleaner"

On the client it is much more restricted, however with GWT2.1 they introduced SafeHtml which could be what your looking for.

However, provide an example of your input and what you would like to have escaped in that, so its much easier to help you out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜