cleanup regex
This commit is contained in:
parent
3d637372ca
commit
9c11d5e07c
@ -19,7 +19,7 @@ class AddLink extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
short () {
|
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))) {
|
if (this.state.value === "" || this.state.value.includes('timka.su') || !(regex.test(this.state.value))) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user