Text links are stripped from image captions

Description

Basic HTML, like text links, should be allowed in image captions. Links are now stripped from the captions.

Text links in the image caption would be the most logical way to credit the photographer. In some cases, a link to the license covering the image is also mandatory. Creative Commons-licensed images are a great example of this.

As it turns out: Links with singly-quoted attributes are only stripped if you are using the visual editor (in WP 2.9.2). If you are using the basic (HTML) editor, they are instead escaped before inserting them into the shortcode, which works fine.

I'm guessing a solution would involve doubly-quoted attributes being made singly-quoted before they are escaped, as I'm guessing the double quotes mess up the way shortcodes work. On top of that we need to figure out why the visual editor doesn't give the same result as the basic editor.

Single quotes work in HTML mode. Double quotes in HTML mode (escaped or not) break the caption if caption="..." uses double quotes. Tags are stripped if you use the caption field in the Image GUI but the caption still works.