Last modified: 2012-11-09 11:51:56 UTC
The query parameter link=none does not have any effect for properties of datatype URL. The result is still shown as a link. Likewise it is not possible to create a plain printout with #-
Fixed in https://gerrit.wikimedia.org/r/#/c/28393/
I have to re-open this, since there is a more fundamental issue here that needs to be discussed. The solution I implemented causes other problems (reported in Bug 41275): it is now impossible to make a URL value into a link even if one wants to. As it is now, we do not know of any way to return a URL value that is not linked by MediaWiki automatically but that is linked if you put it in [ ] (e.g. in a template). So we can only have either of these behaviours. I suggest to have the following: * Output format #- returns the plain URL string, as it did originally. This will be turned into a link by MW. * A new output format #nowiki returns an escaped URL string that is not turned into a link by MW (and cannot be turned into one with [ ] either). The question is: what should link=none do? Normally, it means that the output is not linked *actively* by SMW (adding [ ] explicitly). So link=none does mean the same as #- (leaving something away, returning the data in a less processed state). But it is not intuitive that link=none does produce a link in the final output (not in HTML, just on the page). Any comments? Btw. note that #nowiki could also be supported for string data: there it would escape the string like for datatype Code, so that it is not acted on by MW at all. It seems a fairly useful keyword to have as an output format, since it is already a known term in MW.
*** Bug 41275 has been marked as a duplicate of this bug. ***
+ for your suggestions Concerning link=none we could adjust the documentation in a way stating it refers to internal links only, which is both the current and future behaviour. Adding an alias link=nointernal would perhaps be a kind of overdoing it. Supporting #nowiki for datatype string would be nice, too.
This should do it when merged: https://gerrit.wikimedia.org/r/#/c/32555/ This restores the old behaviour on all cases but adds a new #nowiki outputformat to avoid linking the hard way. """ Changed the behaviour to be as follows: * if linking is enabled ("link=all", default), URLs will be made into an explicit link using [ ] in wiki and <a> in HTML * if linking is disabled or outputformat "empty" is used (#- or simply #), then URLs will be returned as plain strings in wiki and HTML; in wiki this will mean that the URL will still be linked if MW is configured to link such strings automatically (default) * if the new outputformat "nowiki" is used (#nowiki), then the URL string will be escaped to prevent MW from making a link of it, so it appears as a plain string in HTML and wiki alike; this changes the string so that it is no longer a valid URL """