Last modified: 2010-08-30 13:32:02 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 T26807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24807 - "Attribut:Test" != SMWExporter::decodeURI (SMWExporter::encodeURI ('Attribut:Test"))
"Attribut:Test" != SMWExporter::decodeURI (SMWExporter::encodeURI ('Attribut...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-15 23:17 UTC by Karima Rafes
Modified: 2010-08-30 13:32 UTC (History)
0 users

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


Attachments

Description Karima Rafes 2010-08-15 23:17:41 UTC
Hi

Someone forgot to add the caracter ":" in the function decodeURI.

SMWExporter::encodeURI ("Attribut:Test") => Attribut-3ATest
but
SMWExporter::decodeURI ("Attribut-3ATest") => Attribut-3ATest !! ERROR 
The good result is "Attribut:Test".

bye
karima

BEFORE MY FIX ------------------------------
	static public function decodeURI( $uri ) {
		$uri = str_replace( array( '-22', '-23', '-26', '-27', '-2B', '-21', '-' ),
		                    array( '"', '#', '&', "'", '+', '!', '%' ),
		                   $uri );
		$uri = str_replace( '-2D', '-', $uri );
		return $uri;
	}
AFTER FIX ----------------------------------------------------
	static public function decodeURI( $uri ) {
		$uri = str_replace( array('-3A', '-22', '-23', '-26', '-27', '-2B', '-21', '-' ),
		                    array( ':', '"', '#', '&', "'", '+', '!', '%' ),
		                   $uri );
		$uri = str_replace( '-2D', '-', $uri );
		return $uri;
	}
Comment 1 Markus Krötzsch 2010-08-30 13:32:02 UTC
Resolved in SVN (and soon in SMW 1.5.2). The problem has not been noticed since all uses of decodeURI() apply urldecode() to the result, and %3A gets replaced by : in this step.

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


Navigation
Links