[4359] Wiki link error when it ends in parenthesis

Started by spiros, February 19, 2011, 04:59:33 AM

Previous topic - Next topic

spiros

Links like this: http://it.wikipedia.org/wiki/Elio_(nome)

will not parse correctly. The parenthesis at the end is not parsed as part of the link. Applies to SMF 2 as well.

Illori

it might be better to post this under bug reports.

spiros

Well, in order not to double post, perhaps somebody could move it there.

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

spiros

Thanks. I guess this should be an easy fix, right?

Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

live627


Illori

that way works fine, this issue only happens when the forum turns it into a link when not using url tags

live627

Precisely. The RegEx doesn't take those characters into account fully.

spiros

Quote from: live627 on February 22, 2011, 02:30:01 PM
Try embedding the link in the [url] tag


Yes, this is what I have been doing, but it is easier to just paste a link and have it work  :)

Arantor

Though it's essentially a moot point, it will have other consequences by doing that.

QuoteSome random example, mentioning a website by name (and its address in parentheses just for readers, http://www.example.com/)

That now breaks. While *that* one was contrived, I know full well I've put links to things in parentheses before now...
Holder of controversial views, all of which my own.


Aleksi "Lex" Kilpinen

Well, if people can't be bothered to add a space after an URL, it's their problem ain't it? :P

I've always added spaces after smiley codes, URLs and other stuff just to make sure they won't break...
So I think it would be OK to just parse everything after http: up until a space as an URL.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Joshua Dickerson

No, we should use the correct regular expression as far as the RFC is concerned.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Aleksi "Lex" Kilpinen

#13
Quote from: Joshua Dickerson on February 23, 2011, 01:38:49 AM
No, we should use the correct regular expression as far as the RFC is concerned.
For what reason exactly? I'm just curious, since I've seen URLs with pretty much all other characters, but spaces I have not seen as part of an URL, regardless of the RFC, there are some wacky stuff we have missed other than this. For example http://www.tänään.fi/ Is actually VALID (and a working website) but doesn't parse as such.. ;)

( ADDED: See, http://dev.simplemachines.org/mantis/view.php?id=4623 Mantis understands it, SMF doesn't. )
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Joshua Dickerson

See the other post regarding this. That is an IRI. The reason we should go with the RFCs is because as soon as we choose something that differs, it will be a bug. Then we'll be in a loop of fixing something with a bug.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Joshua Dickerson

I just tried this on this site and it parses that URL fine. Am I missing something?
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Illori


Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Sir Osis of Liver


This happens in .1x and 2.0.2.  If a url ends with a closed parenthesis, it's not included in the link, and link is no good.  Try it -

http://en.wikipedia.org/wiki/Gale_(crater)

If you embed the url in bbc tags, it works.  Like this.

:P
When in Emor, do as the Snamors.
                              - D. Lister

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Advertisement: