Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

encodeURIComponent adds % characters

Posted on 2014-11-04
3
Medium Priority
?
93 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 2000 total points
ID: 40422459
decodeURIComponent
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

972 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