The percent-encoding is automatic, done by passing the path through the
url() function (which is used by the l() function). We pass it something
like "islandora/object/some:pid", it passes it down to
drupal_encode_path(), which passes it down to rawurlencode(), replaces
the percent-escaped forward slashes with "real" forward slashes
again... Hurray for tracing the calls? :P
We want paths to go through the url() function, because it can deal with
clean URLs and language prefixes and the like, so without patching
Drupal or reimplementing the url() function such that we undo the
encoding of the colon as well and changing all the calls, you're pretty
much stuck with filtering the HTML(/output, as these links may be
contained in Javascript or other formats as well)... I'm not sure that
mod_rewrite (if that's what's meant by an "Apache [...] rewrite rules")
would handle this case. I was of the impression that it just transformed
the request, so if you requested
"
http://www.example.org/islandora/object/myrepo%3Amyobject", it could
transform it to
"
http://www.example.org/islandora/object/myrepo:myobject" behind the
scenes, with the user being none the wiser... Instead, you'd have to
change the URLs anywhere they might happen in the body of the
response... Something like the sed example here:
http://httpd.apache.org/docs/2.2/mod/mod_ext_filter.html
... I'm actually not sure I completely understand the problem... You
should be able to enter URLs with the unescaped colon in the PID, and
have it find the proper object, such that both of the example URLs you
provided should work the same (provided they pointed at a valid install,
of course), so as to "write" it either way.
- Adam