I have already found many posts on this subject, however no post handles my specific issue.
This is the regex that I use (found on this website) :
function validateUrl(value){ return /[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}([-a-zA-Z0-9@:%_\+.~#?&//=]*)/i.test(value); } This validates my url correct till up to the following point:
mydomain.tld/mypage/this'go(es{wro[ng
My function returns true, even when there are not-allowed characters like:
' or " or ( or ) or [ or ] or { or }
I don't understand why this is allowed. I have this: [-a-zA-Z0-9@:%_\+.~#?&//=]
Should return 'false' in my opinion...
^and$anchors.