[Tiki-devel] Anchors are screwed up

Volker Wysk <post-hhF2Jplw28UoZk/[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
Hi.

In wikiplugin_aname.php and wikiplugin_alink.php, there's the following:

    // the following replace is necessary to maintain compliance with XHTML
    // 1.0 Transitional and the same behavior as tikilib.php. This will 
    // change when the world arrives at XHTML 1.0 Strict.
    $aname = preg_replace('/[^a-zA-Z0-9]+/', '_', $aname);

This means, only latin letters and digits are allowed in anchor names.
Everything else is replaced by an underscore when rendering the HTML page.

This (sometimes) works, as long as only the AName and ALink plugins are
used. But it doesn't, when the subsection part in an internal link is used -
((Page|#Subsection|...)). I've tried it with "((Ankertest|#Überschrift-
Anker))" and got a subsection part of "#%C3%9Cberschrift-Anker" in the
generated HTML.

The subsection part needs to undergo the same treatment as the anchor name,
which the AName plugin does, when this is supposed to work.

Anchors which are generated from headings are different as well. I've tried
it with a heading called "Überschrift dazwischen", and the resulting anchor
name in the HTML page is "berschrift_dazwischen".

And what about languages that don't use a latin alphabet, such as many Asian
languages? The complete anchor names will be replaced by an underscore.

Anchor handling is really screwed up.

The world has "arrived at XHTML 1.0 Strict" long ago - in 2002, it says in
the https://www.w3.org/TR/xhtml1/ page. So it's time that "this will
change".

Regards,
Volker

_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE6QXGh82Ov3+2nrxp+K4ydFOsHoUFAmPD4PQACgkQ+K4ydFOs
HoWmKxAAofEapE/qIbm+VJB41tJXzR7P1wq1yexxO6Z/kyFu93lv4ubYmM3nW0zE
vwGCal4uuw59OVE+0AZXA3k0mrZoSSVM3zXGRz3w4BcTvdpNTGLz79lTyBzVO8l3
u17C/ITU/w2QptE/enMzDTRC8LfaJU9+uGDlCxgoerMcH/p2Bwx0Ho2pSA1nl9xv
CTbwvjBmDOMrpo1Z4oRzmIvsAytx32t4BpXbddLK5P8mPqD/OCAjViz0zopO0fsw
XoHoGDCOOVuAC3JxnyOevYCO1j7cPRZwLhOCXamkNxfLg3TQ1C2rtloTLKNm+tji
4ZKJ6sm9TCWj6QJ1m5TYaLTrWFPu7Hhm8Jtyybszq1ITexWoYSL2j3aMgB1AARDz
7K8VRVWdU8P0/41nDHm5zESgZyj8iZP/KwNRySPW6VeoFW8wrbBOBC58XMvbqUnd
45qsFcKd11L5LiM/o0GdTV71NaWCBofbHP+irqmH7cejrffe0WqhKKGooNpfJpVw
D5TrO9wBL5XdCgTC2ZKUapRhSSXzXfJ7JwIeCUNPGY+kfH3DTx1QFMdYPI6h2lwr
Tvqp3UgLjSCR+vJ1Gb9DnPkFPkiC5+tVZR/GR16tcFd30KuO146K+Dcz/rWq3rcm
yQDC5DqoBzLCiHMveEyhPS1fel9NSYy8gxToiFo1V0j3j2tN8g8=
=sAZq
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.