snailbites/chat — pull request #5 by adamhenson (2014-11-13 22:18:17+00:00)
Title: Let users display an image as a message

If a user pastes in an image string (for example: http://4.bp.blogspot.com/-pqjGZvbJ2vw/UsE3u79xyEI/AAAAAAAAAvo/HxaD9DjPzvQ/s640/air-jordan-6-infa-red-retro.jpg), the image is shown in the message box.

If the message passes the regex for an image (with no spaces), the an html image element is created, otherwise sanitize the string as before.

I added CSS to constrain the image.