mirror of
https://github.com/xvvvyz/tilde.git
synced 2026-03-11 14:44:24 +00:00
update url regex
This commit is contained in:
parent
dabdc65259
commit
5669faad28
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue