|
Posted by Don Salad on 07/11/06 14:55
"Perry Malen" <p...@nospamformethankyou.com> wrote:
> No, we don't. I took issue not with *why* you tried to check the url-ness,
> but with how. Your regexp:
>
> > /\[url]([a-zA-Z]+:\/\/[0-9a-zA-Z._\-\/\?\&\+]+)/
>
> says, in so many words: Following the [url] tag, match one or more
> characters a-z (case insensitive) followed by a colon followed by two
> slashes followed by one or more 'url-legal' characters. That's it. According
> to this regexp, 'mydog://hasfleas' is a valid url. Obviously, your good
> intentions are not well served by this particular pattern. You should either
> fix the regexp or just drop it altogether and trust that whatever follows
> the [url] tag is, in fact, a url.
You could have a host named 'hasfleas' on your local network, and some
customized 'mydog' protocol.
'mydog://hasfleas' *is* a syntactically valid URL. It just doesn't
work in most cases.
Thanks,
Don
Navigation:
[Reply to this message]
|