Skip to content

Commit

Permalink
Strip URL parameters when creating base URL.
Browse files Browse the repository at this point in the history
The problem arose from links produced by Marketo which took the
following form:

    http://docs.sencha.com/architect/2-0/?mkt_tok=LONGHASH#!/guide

Now we're stripping all URL parameters after the question mark, leaving
just the path and hash-bang parameters.
  • Loading branch information
nene committed Apr 30, 2013
1 parent 0e42b0f commit d9fb034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template/app/controller/Content.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ Ext.define('Docs.controller.Content', {
* @return {String} URL
*/
getBaseUrl: function() {
return document.location.href.replace(/\/?(index.html|template.html)?#.*/, "");
return document.location.href.replace(/\/?(index.html|template.html)?(\?[^#]*)?#.*/, "");
}
});

0 comments on commit d9fb034

Please sign in to comment.