(URI data value) fixes spaces assumed as underscores also for non-wiki URIs #5396
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes issue/4910 and partial revert of #2201
fixes underlying problem causing SemanticMediaWiki/SemanticResultFormats#93 (solved in a recent commit of SemanticResultFormats with a cpu-consuming work-around)
As in the title, the commit #2201 assumes that all spaces (%20) in the URI data values correspond to underscore symbols, which is semantically true only for WIKI's URIs, either external or internal. (for this reason, legitimate URIs including spaces, not exchangeable with underscores, cease to work once imported in SMW)
This PR tries to address this issue, however the impact of the changes should be evaluated against the methods getShortWikiText, getShortHTMLText, getLongWikiText and getLongHTMLText (includes/datavalues/SMW_DV_URI.php)
Also note that the corresponding tests have been identified but not yet updated because they imply a little design change however affecting many tests: see for instance the image below which is related to the new output of getShortWikiText (includes/datavalues/SMW_DV_URI.php)
(in the new output, the space, if any, is not anymore converted to an underscore, and therefore the caption must be explicitly declared in the wikitext, otherwise the url gets broken in two parts, one of them considered the caption -- this is correct, however other reviewers might evaluate if the new output is at the same time appropriate for the different uses of the method getShortWikiText)