Page 1 of 1
The URL tag and you!
Posted: Sat Aug 02, 2008 6:55 pm
by bunder
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.
Left bracket

%28
Right bracket

%29
Backslash

%5C
Here is some examples of a broken link and a proper one:
The original url:
http://en.wikipedia.org/wiki/Music_(disambiguation)
Code: Select all
[url]http://en.wikipedia.org/wiki/Music_(disambiguation)[/url]
result: url tags are ignored ->
http://en.wikipedia.org/wiki/Music_(disambiguation)
Code: Select all
[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
Posted: Sat Aug 02, 2008 8:09 pm
by bytenirvana
thats great to know.
Can't the forum software be configured to take this on automagically?
Posted: Fri Sep 26, 2008 6:45 pm
by notHerbert
URL encoding (easier to see version)
Code: Select all
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
Posted: Mon May 18, 2009 12:41 pm
by kernelOfTruth
bytenirvana wrote:thats great to know.
Can't the forum software be configured to take this on automagically?
++
thanks bunder

Posted: Tue May 19, 2009 5:03 am
by Kate Monster
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?
Posted: Thu May 28, 2009 10:52 am
by bunder
Xaero wrote: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: Select all
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.
Posted: Wed Sep 30, 2009 5:42 am
by schachti
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.
Posted: Wed Apr 14, 2010 2:48 am
by IgnitusBoyone