Fix handling of filenames with hash characters in tree view
Addressable::URI interprets the #
in a URI as a URI fragment
and does not escape it, but Rails has special helpers that treats
these as bona-fide characters that need to be escaped.
Closes #54473 (closed)