Last modified: 2013-08-31 14:47:11 UTC
Created attachment 7427 [details] suggested code and some testing Currently if I'll copy and paste wiki URL I get an information that it's an external link. It would be better if it would (at a very least) recognize standard URLs and change them local links. It would be even better if it could recognize links to wikis in other languages. I think this might be a bit trick to be made universal, along all Mediawiki installations so you might want to skip that. Anyway, I've attached the basic parser that would be (hopefully) uniwersal to any Mediawiki installation. I've added some of test urls on the bottom along with results on pl.wiki. Due to usage of wgServer it will of course return other values on other wikis. Note that I've added decoding of national letters. It was thoroughly tested due to usage in a popular script on pl.wiki, so you can be sure of it.
(In reply to comment #0) > Created an attachment (id=7427) [details] > suggested code and some testing > > Currently if I'll copy and paste wiki URL I get an information that it's an > external link. It would be better if it would (at a very least) recognize > standard URLs and change them local links. > This feature already exists. Go to enwiki, edit a page and fire up the link dialog. Then copypaste a URL like http://en.wikipedia.org/wiki/Foo into the target field and click Insert. It'll then ask you whether you want to turn it into an internal link. Granted, this could maybe use a bit more smartness in terms of recognizing URLs like /w/index.php?title=Foo , but that's another bug.
Hm... That's not exactly what I meant. Rewoerding the title to reflect my intention better. Two main problems with the current solution: 1. I would expect the change would take place while pasting the URL. The URL is currently recognized as external. And I cannot even change it to a wiki page link because it says the title is invalid (which is not true). 2. After pasting this link: http://pl.wikipedia.org/wiki/Wikipedia:Zadania_dla_bot%C3%B3w#Cudzys.C5.82owy And then pushing Insert I get a title like this: Wikipedia:Zadania_dla_bot%C3%B3w#Cudzys.C5.82owy After that, the dialog seems to be unresponsive as I cannot change the title (the input locks up somehow).
Reassign to default per bug 37789