cleanup regex

master
timka 2023-11-23 18:55:20 +03:00
parent 3d637372ca
commit 9c11d5e07c
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class AddLink extends Component {
}
short () {
const regex =/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
const regex =/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|])/ig;
if (this.state.value === "" || this.state.value.includes('timka.su') || !(regex.test(this.state.value))) {
return
}