How to add line breaks inside Gallery Captions

For what it’s worth, this has been fixed in 3.4: http://core.trac.wordpress.org/ticket/18311