Validating a valid URL

From: Shabam (blislecp_at_hotmail.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 04:38:45 -0700

Is there a function that validates if a URL is valid or not? Basically I'm
trying to filter out bogus input, and things like cross site scripting
attacks.

Example:
<img src="javascript:alert(document.cookie)">

Doing it by regex seems way too complicated and there could be holes in the
logic if something is missed.



Relevant Pages

  • Validating a valid URL
    ... Is there a function that validates if a URL is valid or not? ... trying to filter out bogus input, and things like cross site scripting ...
    (microsoft.public.dotnet.general)
  • RE: Cross site scripting in almost every mayor website
    ... yahoo tries to filter them out even if they appear inside the <xml> ... Cross site scripting in almost every mayor website ... You do have full access to the DOM of Hotmail ...
    (Bugtraq)