https://bugzilla.wikimedia.org/show_bug.cgi?id=18931
Summary: SRF Exhibit: URLs need to be encoded in facets
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: SemanticResultFormats
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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 :)
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l