Skip to content

Commit

Permalink
Merge pull request #3655 from chevin99/master
Browse files Browse the repository at this point in the history
Multiple slashes in visualization name re-directs to default app
  • Loading branch information
simianhacker committed Apr 28, 2015
2 parents 5ab0d3d + e97f693 commit 2ff889c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kibana/utils/slugify_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define(function (require) {
'=' : '-equal-'
};
_.each(trans, function (val, key) {
var regex = new RegExp(key);
var regex = new RegExp(key, 'g');
id = id.replace(regex, val);
});
id = id.replace(/[\s]+/g, '-');
Expand Down
6 changes: 5 additions & 1 deletion test/unit/specs/utils/slugify_id.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ define(function (require) {
['test / ^test', 'test-slash-^test'],
['test ? test', 'test-questionmark-test'],
['test = test', 'test-equal-test'],
['test & test', 'test-ampersand-test']
['test & test', 'test-ampersand-test'],
['test/test/test', 'test-slash-test-slash-test'],
['test?test?test', 'test-questionmark-test-questionmark-test'],
['test&test&test', 'test-ampersand-test-ampersand-test'],
['test=test=test', 'test-equal-test-equal-test']
];

_.each(fixtures, function (fixture) {
Expand Down

0 comments on commit 2ff889c

Please sign in to comment.