[mirotalk] - ops

This commit is contained in:
Miroslav Pejic
2023-10-29 11:41:27 +01:00
parent 7541405b5d
commit 5a0c87a46d
2 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -1233,10 +1233,9 @@ function isValidFileName(fileName) {
function isValidHttpURL(url) {
const pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'(localhost|' + // allow localhost
'(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})' + // domain name
'(\\:\\d+)?' + // port
'(\\/[-a-z\\d%_.~+]*)*' + // path
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i', // fragment locator
+3 -4
View File
@@ -6693,10 +6693,9 @@ function isHtml(str) {
function isValidHttpURL(url) {
const pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'(localhost|' + // allow localhost
'(([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,})' + // domain name
'(\\:\\d+)?' + // port
'(\\/[-a-z\\d%_.~+]*)*' + // path
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i', // fragment locator