Forum .LRN Q&A: Re: Is localized cr_items.name necessary for file-storage?

Collapse
Posted by Ola Hansson on
"Ola, URLs with # shouldn't work. That is supposed to be the fragment identifier. Maybe the browser is luckily urlencoding it for you."

Dave, the browser wasn't luckily urlencoding the URL - I added code which does this explicitly before the href is rendered. See: http://cvs.openacs.org/cvs/openacs-4/packages/file-storage/www/folder-chunk.tcl?r1=1.15.2.3&r2=1.15.2.4

By default, "ns_conn url" and friends will decode the encoded hashes back into the original shape so that the returned paths, path fragments, or whatever will properly match strings with localizable keys fetched from the db. If the href is NOT urlencoded beforehand, though, the URL shown in the browser's address field will still contain ENCODED hashes, but - in the "view" index.vuh, for instance - "ns_conn url" will choke on the first hash and cut the URL right there ...

As for the validity of the URL: /file-storage/<span>#</span>file-storage.Assignments# is apparently not a valid URL, but /file-storage/%23file-storage.Assignments%23 is - or so it seems.

/Ola