Write the JavaScript for URL filtering

This commit is contained in:
Rowan Manning
2014-01-14 11:40:23 +00:00
parent a605835cc9
commit d8cb1b6c71
8 changed files with 119 additions and 53 deletions

View File

@@ -6,7 +6,7 @@ function helper (register) {
// Simplify url by removing (eg http://, https://, trailing slashes) from url
register('simplify-url', function (context) {
return context.replace(/^https?:\/\//i, '').replace(/\/$/, '');
return context.replace(/^https?:\/\//i, '').replace(/\/$/, '').toLowerCase();
});
}