aa3d99f3486f487a991927f854abad984eaf2f55
[platform/framework/web/crosswalk-tizen.git] /
1 define(function () {
2
3     /**
4      * Gets full query as string with all special chars decoded.
5      */
6     function getQuery(url) {
7         url = url.replace(/#.*/, ''); //removes hash (to avoid getting hash query)
8         var queryString = /\?[a-zA-Z0-9\=\&\%\$\-\_\.\+\!\*\'\(\)\,]+/.exec(url); //valid chars according to: http://www.ietf.org/rfc/rfc1738.txt
9         return (queryString)? decodeURIComponent(queryString[0]) : '';
10     }
11
12     return getQuery;
13 });