Ultimate Site Testing String

I struggled with the fraught user-text output output area for web pages. The ultimate goal is for user input to be displayed and stored exactly as it was typed, without breaking anything.

For this purpose, I used the following test line:

"_ $% ^ & * () + = - £ {} [] / n / <> \ @ ~; |, # :! &amp;``&quot;&#39;

?

It seems to work well (even Qaru or Twitter are not protected, hence reverse ticks). My question is, will this line capture most of the escaping issues, for example, going from a webpage through Ajax and to the database and vice versa?

Actually, how do I display this line in Stack without reverse ticks?

Is there a better one, for example. let's say one that will also highlight encoding problems?

+4
source share
4 answers

When I test, I use something like this

AB <>! "" /% $$ & Amp;% (()% // &% $ / "& $ /"% &? "!" - ??? F¯Ñ112üêù

Usually this is enough to isolate encoding problems, at least from what I see.

+1
source

Enabling a math symbol, such as unicode x2202, may be useful.

+1
source

Everything seems to be there. The smartest thing to do is (depending on the language you use) to use a library that has been well tested that can misinform user input. Just ask what other websites use.

0
source

See here: http://gendoh.com/2511063

The message itself is written in Korean, but you can see what makes the difference between several given patterns. (V1 to V3 are for general web applications, and V4 and V5 are for javascripts.)

0
source

All Articles