update url regex

This commit is contained in:
Cade Scroggins 2016-06-24 00:01:20 -07:00
parent dabdc65259
commit 5669faad28

View file

@ -230,7 +230,7 @@
var Form = (function(config) {
var searchForm = document.getElementById('js-search-form');
var searchInput = document.getElementById('js-search-input');
var urlRegex = /(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/;
var urlRegex = /(\b(https?|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;
searchForm.addEventListener('submit', function(event) {
event.preventDefault();