Re: URIs vs. half-baked URIs (was Filesel drag and drop)



On Thu, Aug 02, 2001 at 11:01:41PM +0100, Sander Vesik wrote:
> 
> How about a function that verified that a given string is a propely
> encoded URI? 

  Theorically it doesn't work, you don't know if the % was intentional
or not. Okay if you have % and exactly 2 numbers (arabic) then there is
a high probability it is already escaped. But it's an heuristic at best.
The real solution is to know where this comes from and what escaping level
is needed (when you start then embedding those URI in XML, then you add
XML espcaping -- and if using XPointer the one associated, you can end up
with 3 layers in this case :-\). The point is that the need for escaping
or not should be dependant of where the data comes from. The only problem
if when it's an huma input, you may get either escaped or unescaped URIs...

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]