• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 71
  • Last Modified:

What makes space and quote characters "unsafe?"

What causes certain characters to be "unsafe"?

What is it about the spaces and quotes here
var example = "\"Quoted Value with spaces and &\"";

which makes them unsafe?

After encoding the encoded that string, it becomes: %22Quoted%20Value%20with%20spaces%20and%20%26%22.

2 Solutions
hacker code injection
Shaun KlineLead Software EngineerCommented:
For URL encoding, passing an ampersand (&) in the URL would cause issues, as it is used to separate name/value pairs in a query string. Spaces are encoded because some older web servers could not handle them correctly because it broke up the URL into pieces. Many Unicode characters are also encoded because many US/English based web servers can only handle single byte characters.

HTML encoding has similar issues, such as the less than sign (<). If that was included in a URL and then displayed on a page, it could cause the HTML to break.

It all depends why the encoding occurs.
newbiewebSr. Software EngineerAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now