1 (edited by JeanC 2010-12-03 12:11)

Topic: bbcode: space in url produces error

A space in an url in a post will give trouble.
If I try to submit a post like
www.someplace.com/this is an ulr.html

with url tags around it I get:

Warning! The following errors must be corrected before your message can be posted:
url was opened within itself, this is not allowed

I can't even post here with http:// before such an url.

If I omit the tags I get an invalid link like above.

Please tell me there is a workaround, change something somewhere in the bbcode parser code maybe?

Thanks.

2 (edited by Warhaven 2011-01-21 18:42)

Re: bbcode: space in url produces error

Ideally, the tag would probably trim whitespace from the ends, and substitute the rest of the spaces with %20.  Clearly, it doesn't do that, as it would be difficult to differentiate where your URL beings and ends, unless you specifically encapsulate it in the URL tags.  For example, if you had:  My website www.foo.bar/ajax/ is having a problem with the /index.html file.  How would the BBS know, unless explicitly encapsulated with the URL tags, that you don't mean:  "www.foo.bar/ajax/ is having a problem with the /index.html" with an actual folder name " is having a problem with the " containing the index.html?

So, just use %20 in place of spaces if required.

www.someplace.com/this%20is%20a%20url.html

If you're using Safari web browser and click on the above link, you'll see the %20 show up as spaces in the URL bar.