Re: [Tiki-devel] Anchors are screwed up
Volker Wysk <post-hhF2Jplw28UoZk/[email protected]>
| Newsgroups | gmane.comp.cms.tiki.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Dienstag, dem 17.01.2023 um 11:59 -0500 schrieb Dr. Sassafras: > > > > 3. Use the old method, which throws away non-ASCII characters, as well. > > This > > means that *two* anchors are generated for each occurrence of an anchor > > in > > the Tiki page. > > Instead, perhaps a preference be made to “enable compatibility with pre- > tiki 25 anchors” which is disabled by default for new installs and enabled > by default for upgrades. Then we move forward with clean anchors into the > future and have a preference that can keep compatibility with a bit of a > hack moving forward. That sounds good. One of the principles of Tiki is to "make it optional", I've read somewhere... > > Or perhaps just have an option for which one will be used, with the new > version enabled by default and upgrades keeping the same style. Seems like > this is just an issue for non-latin languages, so many tiki’s may work > fine the old way. It's also an issue for European languages other than English, which use accented letters. It works, most of the time, but you have to botch links that use such anchors, by hand. And you get ugly URLs... > Even still I do remember having some minor issues with this when working > with german. In any case this issue is not a deal breaker with many > installs. Old tiki’s continuing to work the same way, while new tiki’s > moving forward with a universal solution would be preferable in my books. > But I don’t like the idea of dual anchors. When people look at the code > its not going to be obvious what is going on. If I am looking for an > anchor to use, then will see two and pick one. Better to decide whats best > and move forward with that. You won't be looking a the HTML code, will you? It's unreadable (before you send it through htmltidy). Cheers, Volker > > Just my 2 cants. > > > > > This way, compatibility with old Tiki pages is ensured. > > > > 4. Encode the subsection part of internal Tiki links with the new > > function, > > when generating HTML. Old links, which have the manual underscore > > replacement in it, won't get changed by the new encoding. They will > > match > > the old anchors (3.). New links, which don't have an encoding in the > > subsection part, will match the new anchors (2.). > > > > Doing it this way wouldn't require any transformation of old Tiki pages' > > source code. > > > > > > So I'm creating a wish now... > > > > Cheers, > > Volker > > > > > > > On 15 Jan 2023, at 11:18, Volker Wysk <post-hhF2Jplw28UoZk/[email protected]> wrote: > > > > > > > > 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 > > > > > > > > > > > > _______________________________________________ > > > TikiWiki-devel mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > > > > _______________________________________________ > > TikiWiki-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > > > _______________________________________________ > TikiWiki-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel _______________________________________________ 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+K4ydFOsHoUFAmPKefMACgkQ+K4ydFOs HoXdPw//WhiIiAwbmOkEeGuoeednIgMMktlVR44wGKTMwRdNn8h1XUvet4pWxCqk gEvM6SJ/R4DnPXMs6hVnzEt91lJHsXL4GusTx6K4vpltOzuYJuDTfBiNrcmgdpVy 72cfJijr3RQc1BHL+75wr/60EHY+rbFR3jYw/D7cykf3pjyB0Fj3HWw+1TwmTdB9 YgmU/AXDc31Izm0dqzewJ2tvidEt8NB+oKlvPMMDBiI4eWkeD6sx+nGtn7MfdaxK njvL0UTO0YZwRLa3/28HH1AlxUhKHZ1VBKRB3lp1IZRmRPBz89h4Eu7IlbNDhBtp KYcyXeCbFeffGGmmIn2YxnlhIc424FhqqWwBXAbCw/c+p3eOthxpwTd6WX6yW7Yk PWdHBsX4QXIiGcH2MKTQjIYUFuk+gEPR8gNGchPzt30qCaSnhE8hT20ad1wJe5g7 UJNVh+eH7L3h5qQ5ZlhPq+M+iX06dYvattSPerEZTonlmJUcHEI3PxVPW8mJzjYx KjA8h8B1qXC3SPwZVeP2msw3T5uNJiSpDYV6I0jsKCaXWrXpc6AxeKO6vunu12Hc FB5mboQcHZUVo9248Hkv36COD02ZkV36OwUtEkyMPG2Wham7PGUK9JNQDpNr0f9q DDyxBXlTNLgoXvrTImbVba1tzUcxGsGyCmQA7ygKiOkYtkuX79M= =qNez -----END PGP SIGNATURE-----