Open kkda opened 11 years ago
this issue goes deeper - hash and query URIs are just not supported by this extension (so maybe we should skip the button in this case :)
Does the rest of OntoWiki fully support resources with such URIs? If so, problematic characters in "Back to Site" URI should just be percent-encoded (such URIs do work right now with this extension, if you fix address manually).
in general, OW can handle such URIs.
the problem is not the button but the site.extension logic (got hash uris) - the Controller does not know, which hash uri is requested (fragment IDs are simply not send to the server) - so we have to live with this incompleteness here ...
Currently "Back to Site" gives URIs like /test#a?b.html which are inaccessible as you described. But /test%23a%3Fb.html works.
http://example.org/test#a?b
the same URI as http://example.org/test%23a%3Fb
if not, we would have to problem to decide, where to send requests to http://example.org/test%23a%3Fb
.http://example.org/?about=http%3A%2F%2Fexample.org%2Ftest%23a%3Fb&c=d
?http://example.org/test#a
to redirect to http://example.org/test.html#a
, so it can be used to denote resources described at the same page?@kkda if we want to fix it, we could solve this in the same position, where we have just recently solved the back to site button 12a84d0209c0250937225ac95e48dc0f37aaf7f9, by urlencoding #
and ?
.
But I think we should keep the behavior as it is, because I currently can't think of a correct solution.
For example, "#" or "?".
"Back to Site" URI doesn't work ("Invalid controller specified (product)"); properly percent-encoded URI works.