Computer Haven
https://computerhaven.com/forum/

Problems with direct links in a post
https://computerhaven.com/forum/viewtopic.php?f=29&t=2410
Page 1 of 1

Author:  Doddie [ Sat Jun 20, 2020 4:04 pm ]
Post subject:  Problems with direct links in a post

This thread may seem to start out as odd but that is because it was split off of another topic to help keep the original topic uninterupted. :) Here is a link to the original topic:
viewtopic.php?f=11&t=2402


I'm not sure what's going on with the Forum but i've just reviewed the links in my first post and for some reason the link within the following is being posted with a phantom space between the end of 1945 and the close bracket.

"As far as i can tell that was the last air raid of the war in Europe:
https://en.wikipedia.org/wiki/Operation_Judgement_(1945)"

When inserting the link it appears as if the link has no space but after submitting the link is broken because a space is being added, i've tried to edit the link but no matter what i do the space keeps on being insertered.

Can a mod please look into what's going on?

The correct link should be, with no space between 1945 & the close bracket:
https://en.wikipedia.org/wiki/Operation_Judgement_(1945)

Oddly previewing the link displays no space but on submitting there is a space that i cannot correct?

Author:  sboots [ Sat Jun 20, 2020 6:47 pm ]
Post subject:  Re: Problems with direct links in a post

I can't explain why the space is appearing, but the link is working fine and actually goes to the page at the URL with no trailing space or closing parenthesis.

Author:  jaylach [ Sat Jun 20, 2020 7:16 pm ]
Post subject:  Re: Problems with direct links in a post

sboots wrote:
I can't explain why the space is appearing, but the link is working fine and actually goes to the page at the URL with no trailing space or closing parenthesis.

I don't know about the space either but suspect that the forum software is not parsing the (####) properly. The links actually don't work but are close. The page that comes up asks if you want the proper page.

Doddie, I think I may be able to fix the links if you would like.

Actually let's see...
https://en.wikipedia.org/wiki/Operation_Judgement_(1945)

Yep, just as I suspected using the [url] function instead of just pasting the link works fine. Here is what I did:
Code:
[url=https://en.wikipedia.org/wiki/Operation_Judgement_(1945)]https://en.wikipedia.org/wiki/Operation_Judgement_(1945)[/url]

Author:  sboots [ Sat Jun 20, 2020 9:11 pm ]
Post subject:  Re: Problems with direct links in a post

And.... Derp. You are, of course, correct, Jay. I saw a Wikipedia page and assumed it was correct without actually reading a thing!
-steve

Author:  Doddie [ Mon Jun 22, 2020 3:07 pm ]
Post subject:  Re: Problems with direct links in a post

jaylach wrote:
sboots wrote:
I can't explain why the space is appearing, but the link is working fine and actually goes to the page at the URL with no trailing space or closing parenthesis.

I don't know about the space either but suspect that the forum software is not parsing the (####) properly. The links actually don't work but are close. The page that comes up asks if you want the proper page.

Doddie, I think I may be able to fix the links if you would like.

Actually let's see...
https://en.wikipedia.org/wiki/Operation_Judgement_(1945)

Yep, just as I suspected using the [url] function instead of just pasting the link works fine. Here is what I did:
Code:
[url=https://en.wikipedia.org/wiki/Operation_Judgement_(1945)]https://en.wikipedia.org/wiki/Operation_Judgement_(1945)[/url]


Thanks Jay, i've gone back over my earlier posts in this thread and used the URL function to correct the links, if you see something i've missed then please correct them.

I left the broken links as they are in the posts where i was trying to explain what the issue is so that if others see a similar quirk in future they might know how to rectify the problem.
[Feel free to clean up the thread if you think it would be a benefit.]

It is odd that Wikipedia seems to be the only website that has this issue (to my knowlwedge) :dunno:

For anyone intersted in the content, to get the full context you might consider starting from the beginning again now the links work as intended.

Author:  jaylach [ Mon Jun 22, 2020 3:17 pm ]
Post subject:  Re: Problems with direct links in a post

YW. :)

It isn't specific to Wikipedia. It is specific to the use of () in a direct link. check out the example below. (test ) was entered as (test) and still shows as such in the post editor.
https://jaylach.com/(test)

Author:  Doddie [ Mon Jun 22, 2020 3:53 pm ]
Post subject:  Re: Problems with direct links in a post

jaylach wrote:
YW. :)

It isn't specific to Wikipedia. It is specific to the use of () in a direct link. check out the example below. (test ) was entered as (test) and still shows as such in the post editor.
https://jaylach.com/(test)

That makes sense, bear in mind i don't know coding, yet it somehow makes sense :)

Author:  jaylach [ Mon Jun 22, 2020 4:17 pm ]
Post subject:  Re: Problems with direct links in a post

Doddie wrote:
jaylach wrote:
YW. :)

It isn't specific to Wikipedia. It is specific to the use of () in a direct link. check out the example below. (test ) was entered as (test) and still shows as such in the post editor.
https://jaylach.com/(test)

That makes sense, bear in mind i don't know coding, yet it somehow makes sense :)

Actually it isn't so much coding as it is proper link structure. The only proper punctuation in a link/url is a dash. Even the commonly seen underscore is considered improper. Since the forum software is written in languages called PHP and JavaScript. The () in a link becomes problematic as the () is a key part of PHP and JavaScript code structure. In other words it confuses the functions that handle a direct link. The () works using [url] as that is actually BBCode and handled by totally different functions.

This may seem odd as, if you look at the address for this thread in the address bar of your browser, you will see =, ? and & but these are actually defining variables appended to the URL, not actually part of the URL.

Author:  Doddie [ Mon Jun 22, 2020 4:55 pm ]
Post subject:  Re: Problems with direct links in a post

jaylach wrote:
Actually it isn't so much coding as it is proper link structure. The only proper punctuation in a link/url is a dash. Even the commonly seen underscore is considered improper. Since the forum software is written in languages called PHP and JavaScript. The () in a link becomes problematic as the () is a key part of PHP and JavaScript code structure. In other words it confuses the functions that handle a direct link. The () works using [url] as that is actually BBCode and handled by totally different functions.

This may seem odd as, if you look at the address for this thread in the address bar of your browser, you will see =, ? and & but these are actually defining variables appended to the URL, not actually part of the URL.

I used to think i knew what you you were talking about, now i know i have no idea! :D :rofl2:

Author:  jaylach [ Mon Jun 22, 2020 5:28 pm ]
Post subject:  Re: Problems with direct links in a post

Sorry, it all boils down to the () confusing the forum software. :oops:

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/