Download & Extend

MediaWiki filter does not handle URLs with brackets correctly

Project:PEAR Wiki Filter
Version:6.x-1.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

This is a FYI for whoever suffers from that bug.

Using the MediaWiki filter, try to enter a URL such as [http://en.wikipedia.org/wiki/Talk_(software) Talk]. You'll see that the whole URL appears instead of just the description, and it appears incorrectly because the closing bracket is not included in the URL.

I submitted a patch against the Text_Wiki_Mediawiki PEAR package.

Comments

#1

I attached the patch here also because the PEAR bug tracking system makes it difficult to wget the patch file.

AttachmentSize
mediawiki-url.patch 332 bytes

#2

I have a similar problem I cannot seem to spot a solution for. External URLs are not even processed. It spits out the whole URL with the label and containing brackets (i.e., it literall will print "[http://en.wikipedia.org/wiki/Talk_(software) Talk]"). Its printed as text and not a link.

I have installed from the CVS and tried this patch, but still no change in the External URL behavior.

Any ideas?

#3

Maybe you're using a Wiki engine whose URL syntax is different from what you wrote? For example, Dokuwiki's URL syntax is different from Mediawiki's.

#4

Thanks for the suggestion kratib.

I double checked and the syntax being used is MediaWiki. I also just noticed another odd behavior that might be a clue to what is going on. External URLs that link to an external Wiki, like wikipedia.org or mediawiki.org are being displayed properly, except only as text, and not as links.

For Example:
[http://meta.wikimedia.org/wiki/Help:Contents User's Guide] is printed as "User's Guide"

and

[http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ] is printed as "MediaWiki FAQ"

However, neither are made links by the input filter. Any seen this behavior before?

UPDATE:

This behavior is not restricted to external Wikis. Some more tests have shown me that there seems to be no pattern. The behavior I have described above is seeming random. Some URLs are being printed as just a text label (not a link) and others are printed with the URL, label and containing brackets. It kinda looks like a regex problem, but could it be something else?