moxiecode/moxie — pull request #4 by MaxKorz (2012-12-03 21:34:38+00:00)
Title: Fix buildUrl function

Utils.js:740 have you forgot escape character in group#12 (checks for query)?
example:
http://example.com/?query=2
query is "query=2", should be "?query=2"

Utils.js:752 If URL starts with '/' (relative) it returns "FALSE"
therefore condition is not satisfied

Utils.js:766 some code to test various URLs

XMLHttpRequest.js:357 add query string

XMLHttpRequest.js:802 expected parameter was missing

now those urls can be handled correctly:
'http://example.com'
'http://example.com/'
'http://example.com/test'
'http://example.com/?test=1&anything=anything'
''
'/'
'/test/'
'/?test=5'