Hi. I'm working on a script which edits a page, adds a section to it and 
then redirects to this page.

It would be nice if it went straight to the newly-created section. So I 
need to create a link with # in it.

The problem appears when the title of the section contains some 
diacritics. For example, link to "bażant królewski" looks like 
"Ba.C5.BCant_kr.C3.B3lewski".

How can I generate in JavaScript such a link which would be identical to 
the one generated by MediaWiki? Has somebody written such a function? Or 
at least, do you know where it is done in MediaWiki php code?

Thanks in advance. And sorry, if it's not the right place to ask this 
question.

lampak

PS. Links with numbers (like "#1") will not work in this case, in case 
somebody would like to propose it.


_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to