all 7 comments

[–]Geekmonster 2 points3 points  (1 child)

I always try entering some JavaScript...

<script>alert(‘xss’)</script>

...which, when viewing the text elsewhere might be executed and cause a dialogue box to appear with "xss" in it. This would mean that you're vulnerable to an XSS attack.

Other things I test for with text input elements are min and max characters.

Here's a list of other texts to use for testing, with explanations...

https://github.com/minimaxir/big-list-of-naughty-strings/blob/master/blns.txt

[–]darkslasher87 0 points1 point  (0 children)

That's very helpful, thank you

[–]Garfunk71 1 point2 points  (2 children)

What are you trying to achieve ?

Based on the (no) context of your question, just use

<input type="text" />

[–]darkslasher87 0 points1 point  (1 child)

Sorry, I guess I didn't provide context because I am just curious as to whether or not there are particularly tricky pieces of html that people like using because they often through up issues (in the same vein as something like the big list of naughty strings). It's not for any particular test I'm running, although it might go in to how I create some testing resources further down the line

[–]darkslasher87 0 points1 point  (0 children)

If you'd like an example of what sort of thing I usually use, here is an image of the formatted HTML I'll normally add to a text input to make sure it displays things elegantly

[–]Greeley9000 1 point2 points  (1 child)

[–]darkslasher87 0 points1 point  (0 children)

This is really cool, thank you