Fixes java 1.6 compatibility of image links replacement functionality in chat window.