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.

Thanks.
newbiewebSr. Software EngineerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_davisCommented:
hacker code injection
0
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
newbiewebSr. Software EngineerAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.