Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #15 from duckduckgo/dave/filter-path-semicolon
Browse files Browse the repository at this point in the history
break domainPath at semicolon
  • Loading branch information
dharb authored Jun 12, 2017
2 parents 6c57a0a + b186340 commit a713fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion template_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
// It converts things like: http://blogs.wsj.com/law/2013/11/14/google-wins-dismissal-of-book-scanning-suit/?mod=smallbusiness/
// Into: blogs.wsj.com/law/2013/11/14/google-wins-dismissal-of-book-scanning-suit/?mod=smallbusiness/
Handlebars.registerHelper("domainWithPath", function(url) {
var re = new RegExp('^.*?\/\/([^\?\:\#]+)');
var re = new RegExp('^.*?\/\/([^\?\:\;\#]+)');
if (re.test(url)) {
return RegExp.$1.replace('www.','').replace(/\/$/,'');
}
Expand Down

0 comments on commit a713fd8

Please sign in to comment.