Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The URL tag and you!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Forums Feedback
View previous topic :: View next topic  
Author Message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5933

PostPosted: Sat Aug 02, 2008 6:55 pm    Post subject: The URL tag and you! Reply with quote

Every now and again I see a broken URL tag, and wanted to offer some help.

URL's containing ASCII characters tend to break the auto-link mechanism and the URL bbcode tag. Here's how to fix that.

These are the more common characters that cause such breakage, and the codes needed to fix them.

Quote:
Left bracket :arrow: %28
Right bracket :arrow: %29
Backslash :arrow: %5C


Here is some examples of a broken link and a proper one:

The original url: http://en.wikipedia.org/wiki/Music_(disambiguation)
Code:
[url]http://en.wikipedia.org/wiki/Music_(disambiguation)[/url]
result: url tags are ignored -> [url]http://en.wikipedia.org/wiki/Music_(disambiguation)[/url]

Code:
[url]http://en.wikipedia.org/wiki/Music_%28disambiguation%29[/url]
result: url tags do their job -> http://en.wikipedia.org/wiki/Music_%28disambiguation%29

Most of the other ones work fine. Here is a list of ASCII characters, in case the ones you need are not listed above.

Cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
bytenirvana
Apprentice
Apprentice


Joined: 10 Jun 2006
Posts: 218
Location: Volksstaat Hessen

PostPosted: Sat Aug 02, 2008 8:09 pm    Post subject: Reply with quote

thats great to know.

Can't the forum software be configured to take this on automagically?
_________________
Linux User #422770
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Fri Sep 26, 2008 6:45 pm    Post subject: Reply with quote

URL encoding (easier to see version)

Code:
Char    Code    Char    Code    Char    Code    Char    Code
                                0       %30     µ       %B5
!       %21                     1       %31     »       %BB
"       %22                     2       %32     ¼       %BC
#       %23                     3       %33     ½       %BD
$       %24     ¢       %A2     4       %34     ¿       %BF
%       %25     £       %A3     5       %35     A`      %C0
&       %26     ¥       %A5     6       %36     A´      %C1
'       %27     |       %A6     7       %37     A^      %C2
(       %28     §       %A7     8       %38     A~      %C3
)       %29     «       %AB     9       %39     A¨      %C4
*       %2A     ¬       %AC
+       %2B     ¯       %AD
,       %2C     º       %B0
-       %2D     ±       %B1
.       %2E     ª       %B2
/       %2F     ,       %B4     {       %7B     |       %7C
:       %3A     A°      %C5     }       %7D     ~       %7E
;       %3B     Æ       %C6     [       %5B     c¸      %E7
<       %3C     C¸      %C7     \       %5C     e`      %E8
=       %3D     E`      %C8     ]       %5D     e´      %E9
>       %3E     E´      %C9     ^       %5E     e^      %EA
?       %3F     E^      %CA     _       %5F     e¨      %EB
@       %40     E¨      %CB     `       %60     i`      %EC
A       %41     I`      %CC     a       %61     i´      %ED
B       %42     I´      %CD     b       %62     i^      %EE
C       %43     I^      %CE     c       %63     i¨      %EF
D       %44     I¨      %CF     d       %64     ð       %F0
E       %45     Ð       %D0     e       %65     n~      %F1                   
F       %46     N~      %D1     f       %66     o`      %F2
G       %47     O`      %D2     g       %67     o´      %F3
H       %48     O´      %D3     h       %68     o^      %F4
I       %49     O^      %D4     i       %69     o~      %F5
J       %4A     O~      %D5     j       %6A     o¨      %F6
K       %4B     O¨      %D6     k       %6B     ÷       %F7
L       %4C     Ø       %D8     l       %6C     ø       %F8
M       %4D     U`      %D9     m       %6D     u`      %F9
N       %4E     U´      %DA     n       %6E     u´      %FA
O       %4F     U^      %DB     o       %6F     u^      %FB
P       %50     U¨      %DC     p       %70     u¨      %FC
Q       %51     Y´      %DD     q       %71     y´      %FD
R       %52     Þ       %DE     r       %72     þ       %FE
S       %53     ß       %DF     s       %73     y¨      %FF
T       %54     a`      %E0     t       %74
U       %55     a´      %E1     u       %75
V       %56     a^      %E2     v       %76
W       %57     a~      %E3     w       %77
X       %58     a¨      %E4     x       %78
Y       %59     a°      %E5     y       %79
Z       %5A     æ       %E6     z       %7A
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Mon May 18, 2009 12:41 pm    Post subject: Reply with quote

bytenirvana wrote:
thats great to know.

Can't the forum software be configured to take this on automagically?


++

thanks bunder :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
Kate Monster
Apprentice
Apprentice


Joined: 13 Jun 2006
Posts: 226
Location: Clarkston, Michigan

PostPosted: Tue May 19, 2009 5:03 am    Post subject: Reply with quote

Quote:
Can't the forum software be configured to take this on automagically?
I think this is the easiest route. Can't remember those codes for the life of me. Is this doable?
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5933

PostPosted: Thu May 28, 2009 10:52 am    Post subject: Reply with quote

Xaero wrote:
Quote:
Can't the forum software be configured to take this on automagically?
I think this is the easiest route. Can't remember those codes for the life of me. Is this doable?


probably, but it's not worth the work.

in fact, i just checked v3, and it seems to get it wrong too. :?

edit: i've been doing some testing on that and i believe it only affects the ) character, and for a good reason... people tend to post stuff like:

Code:
blah blah blah (blah blah blah http://www.url.com)


however, it only affects the auto-url mechanism in phpbb... if you use the url tag, the urls work as expected. more extensive testing could be done, but brackets are the biggest culprit, so it's all i tested at the time.
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Sep 30, 2009 5:42 am    Post subject: Reply with quote

bunder wrote:
if you use the url tag, the urls work as expected. more extensive testing could be done, but brackets are the biggest culprit, so it's all i tested at the time.


Especially in non-english subforums, other special characters like umlaut characters are also affected. A non-working URL auto detection is, in my opinion, no severe drawback, but at least URLs enclosed in BB tags should be handled correctly.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
IgnitusBoyone
n00b
n00b


Joined: 13 Jun 2005
Posts: 24

PostPosted: Wed Apr 14, 2010 2:48 am    Post subject: Reply with quote

http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Forums Feedback All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum