New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-9395: Blackberry: implement decode/encode URIComponent #75
TIMOB-9395: Blackberry: implement decode/encode URIComponent #75
Conversation
…88' into formatReview #Some more info....
…rry' into formatReview #Some more info....
Reviewers: DavidC, JP ChangeLog: - Implement decode/encode URIComponent Test Cases: - Using sample tibbtest project create var with the value of: 'http://www.example.com/List%20of%20holidays.xml' - Use decodeURIComponent to decode the uri. - Make sure it decodes successfully. - Using sample tibbtest project create var with the value of: 'http://www.example.com/List of holidays.xml' - Use encodeURIComponent to encode the uri. - Make sure it encodes successfully.
Your test cases only test encoding and decoding spaces, i don't think that's a complete test set for this functionality. aren't there many more characters/symbols that need to be supported by this method? |
@@ -116,14 +120,34 @@ int TiRootObject::executeScript(NativeObjectFactory* objectFactory, const char* | |||
|
|||
Handle<Value> TiRootObject::_decodeURIComponent(void* userContext, TiObject* caller, const Arguments& args) | |||
{ | |||
// TODO: finish this | |||
return Undefined(); | |||
if (args.Length() < 1 || (!args[0]->IsString() && !args[0]->IsStringObject())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a TODO note to test using StringObjects, as we currently don't have them working and therefore cannot test them. Same for encodeURIComponent
That is unless you know a way to test with StringObjects, in which case i'm interested to know how.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO added
Update the apidoc |
Reviewed |
Reviewers: DavidC, JP ChangeLog: - Implement decode/encode URIComponent - Updated Global.yml apidoc Test Cases: - Using sample tibbtest project create var with the value of: 'http://www.example.com/List%20of%20holidays.xml' - Use decodeURIComponent to decode the uri. - Make sure it decodes successfully. - Using sample tibbtest project create var with the value of: 'http://www.example.com/List of holidays.xml' - Using sample tibbtest project create var with the value of: 'http://www.e.com/?????????????????' - Use encodeURIComponent to encode the uri. - Make sure it encodes successfully.
Updated |
Code looks good.
I'd like to see from your tests that you verified that the decimal digits and - _ . ! ~ * ' ( ) characters are indeed not escaped |
Validated for 'www.e.com/A-_45'.!~*()' url. Characters not escaped. |
Approved, depends on PR #72 to be merged first |
…rry' into formatReview #Some more info....
Merged with upstream |
reviewed |
Reviewers: DavidC, JP ChangeLog: - Address comments Test Cases: - Using sample tibbtest project create var with the value of: 'http://www.example.com/List%20of%20holidays.xml' - Using sample tibbtest project create var with the value of: 'http%3A%2F%2Fwww.e.com%2F%E3%81%93%E3%82%8C%E3%81%AF%E3%80%81%E3%81%93%E3%82%8C%E3%82%92%E6%97%A5%E6%9C%AC%E4%BA%BA%E3%81%AE%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%A7%E3%81%99' - Use decodeURIComponent to decode the uri. - Make sure it decodes successfully. - Using sample tibbtest project create var with the value of: 'http://www.example.com/List of holidays.xml' - Using sample tibbtest project create var with the value of: 'http://www.e.com/?????????????????' - Use encodeURIComponent to encode the uri. -Make sure it encodes successfully. - Validate the following url: 'www.e.com/A-_75\'.!~*()'. Make sure characters not escaped.
Updated |
approved |
Closing PR based on that fact that encodeURIComponent/decodeURIComponent built-ins are now available and usable. |
Reviewers: DavidC, JP
ChangeLog:
Test Cases: