Last modified: 2013-08-31 14:47:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25789, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23789 - Recognition of local wiki links while inserting links to the URL field
Recognition of local wiki links while inserting links to the URL field
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
WikiEditor (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-04 10:30 UTC by Nux
Modified: 2013-08-31 14:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
suggested code and some testing (1.71 KB, text/x-c)
2010-06-04 10:30 UTC, Nux
Details

Description Nux 2010-06-04 10:30: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.
Comment 1 Roan Kattouw 2010-06-04 10:43:18 UTC
(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.
Comment 2 Nux 2010-06-05 01:27:25 UTC
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).
Comment 3 Thehelpfulone 2012-06-22 19:45:01 UTC
Reassign to default per bug 37789

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links