We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
angular/angular.js@0cbc505
EXTRACT | Function
parseAppUrl| src/ng/location.js:821-1500
To decodePath|src/ng/location.js:590-963
The text was updated successfully, but these errors were encountered:
Not reported by RM either when re-created with Java version-
Java V1
public class V { static class Location { String $$path; } void parseAppUrl(String url, Location locationObj) { boolean prefixed = (url.charAt(0) != '/'); if (prefixed) { url = '/' + url; } ResolvedUrl match = urlResolve(url); locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) == '/' ? match.pathname.substring(1) : match.pathname); } }
Java v2
public class V { static class Location { String $$path; } String decodePath(String path, boolean html5Mode) { String[] segments = path.split("/"); int i = segments.length; while (i-- > 0) { segments[i] = decodeURIComponent(segments[i]); if (html5Mode) { // encode forward slashes to prevent them from being mistaken for path // separators segments[i] = segments[i].replace("", ""); } } return String.join("/", segments); } void parseAppUrl(String url, Location locationObj, boolean html5Mode) { boolean prefixed = (url.charAt(0) != '/'); if (prefixed) { url = '/' + url; } ResolvedUrl match = urlResolve(url); String path = prefixed && match.pathname.charAt(0) == '/' ? match.pathname.substring(1) : match.pathname; locationObj.$$path = decodePath(path, html5Mode); } }
Sorry, something went wrong.
mkshiblu
No branches or pull requests
angular/angular.js@0cbc505
EXTRACT | Function
parseAppUrl| src/ng/location.js:821-1500
To
decodePath|src/ng/location.js:590-963
The text was updated successfully, but these errors were encountered: