I am developing an application in titanium using Javascript. I need an open source implementation of encodeURIComponent in Javascript.
Can anybody guide me or show me some implementation?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The specification for this function is in 15.1.3.4.
Modern versions (2018) of V8 implement it in C++. See src/uri.h:
which calls into
Encodedefined in uri.cc.Older versions of V8 implemented it in JavaScript and distributed under the BSD license. See line 359 of src/uri.js.
It’s not called
encodeURIComponentthere, but this code in the same file, esablishes the mapping: