Re: [Tiki-devel] Function for encoding anchor names

Jonny Bradley via TikiWiki-devel <[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
Hi Volker and all

Thanks for the fn, looks good to me, we should compare it with the various other functions we have in tiki already and see if we can merge them - it should live in a library, maybe the parser, or WikiLib, or maybe just in good old TikiLib (where the existing ones are i think).

For instance we have \TikiLib::take_away_accent and \TikiLib::urlencode_accent which do part of the job i think. Also \TikiLib::urldecode...

Probably a good opportunity for Adrien to get to know these old functions and perhaps have a tidy up (although it would be good to be able to backport the eventual fix at least to 24.x).

Thanks, and thanks Marc for picking this up! :)

jonny



> On 24 Feb 2023, at 09:53, Volker Wysk <post-hhF2Jplw28UoZk/[email protected]> wrote:
> 
> Am Freitag, dem 24.02.2023 um 03:49 -0500 schrieb Marc Laporte:
>> Thank you Volker!
>> 
>> https://gitlab.com/adrienmaloba will work with you to get this as a proper merge request so it can make its way into Tiki.
> 
> Making a merge request isn't the problem. But this anchor encoding function
> needs to be applied in various places. Such as
> 
> - the code the ANAME plugin generates
> - the code the maketoc plugin generates
> - how an internal link with a subsection is translated to HTML
> - and more
> 
> The tiki source code is big, and I don't know where to start. Perhaps I
> could update the affected plugins first.
> 
> Bye,
> Volker
> 
> 
>> 
>> Best regards,
>> 
>> Marc
>> 
>> 
>> On Fri, 24 Feb 2023 06:56:17 +0100 Tiki developers [email protected] said
>> 
>>> Hi.
>>> 
>>> Here it is again. I've renamed the function and added some comments.
>>> 
>>> Volker
>>> 
>>> Am Freitag, dem 24.02.2023 um 06:15 +0100 schrieb Volker Wysk:
>>>> Hi!
>>>> 
>>>> I've written a PHP function which does a standards-compliant encoding of an
>>>> anchor name to a URL fragment string (the part of an URL after the "#").
>>>> 
>>>> Now this function needs to be used in Tiki.
>>>> 
>>>> See attachment.
>>>> 
>>>> 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
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.