Solved

encodeURIComponent adds % characters

Posted on 2014-11-04
3
78 Views
Last Modified: 2014-11-05
Hi;

I have a code in which i use encodeURIComponent and it adds % characters to the file i generated. E.g. for space %20 is added. How can I avoid this?

Regards.
0
Comment
Question by:jazzIIIlove
  • 2
3 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 40422193
How can I avoid this?

Don't use encodeURIComponent, maybe you don't need it... or the process saving your data should decode first
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 40422452
Hi,

I haveto use it against xss.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40422459
decodeURIComponent
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

29 Experts available now in Live!

Get 1:1 Help Now