Strip overlay context from File field I have a basic File field set up to allow my users to attach files to nodes.

However, the File field widget in the node edit form displays files as a link to the file, and the URL contains #overlay-context=. Thus when users right click to copy the URL to the file, the URL includes the overlay context, and the link doesn't work (or images don't display).

How do I stop the Overlay module from adding that on to the File URLs on the node edit form?

I have the Insert module, IMCE, and IMCE WYSIWYG bridge enabled to provide users with other options, but some users (including myself) still prefer to right click the file name and copy the URL.
The only thing I can think of offhand is to play with hook_url_outbound_alter() and make a regex to alter only the file paths url in question (not just any and all urls on the site) and strip out the context.

There might be a better way to do this ... maybe like theme_link or theme_links overridden for the given region ?