Last modified: 2010-04-06 20:21:38 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 T20931, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18931 - SRF Exhibit: URLs need to be encoded in facets
SRF Exhibit: URLs need to be encoded in facets
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Fabian Howahl
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-26 13:34 UTC by Laurent Alquier
Modified: 2010-04-06 20:21 UTC (History)
1 user (show)

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


Attachments

Description Laurent Alquier 2009-05-26 13:34:20 UTC
I recently updated my version of Semantic Result Formats and I noticed links from facets appear to be broken. I could swear it used to work before but I can't tell which version was working.

Basically - links used for the title of facets and links used values of properties are not escaped properly and appear as 'broken' as soon as special characters are used. This is visible from the Map, Timeline and Tile views (since the Table view removes all hyperlinks for some odd reason).

I tracked the issue down to the use of the same string both for display and URL of a '_wpg' type. 

I tried messing with URL encoding of the property values at line 296 :

    switch($object->getTypeID()){
	case '_wpg':
--->        $textstack[] = $object->getLongText($outputmode,$this->getLinker(0));

Replacing spaces by '_' on that line seems to be working, however, using URL encoding functions creates other issues (such as encoded characters become visible in the table view).

I ended up fixing the issue by replacing full URLs in lines 247 ($lensstack[]) and 254 ($lenssrc = ) (using scriptPath and 'index.php?title=') by short URLs as defined on my wiki. Going from short URL mapping to full URL takes care of proper encoding of spaces and other special characters.

This solution is a hack though. There must be a clean way to do this instead of expecting the existence of short URLs mappings :)

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


Navigation
Links