snailbites / node-chat

A simple chat server created with Node.js
1 stars 2 forks source link

Let users display an image as a message #5

Closed adamhenson closed 9 years ago

adamhenson commented 9 years ago

jordans 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), an html image element is created, otherwise sanitize the string as before.

I added CSS to constrain the image.

jaredmcdonald commented 9 years ago

yesssss yes yes

adamhenson commented 9 years ago

It lives!

Sent from my iPhone

On Nov 13, 2014, at 5:25 PM, jared mcdonald notifications@github.com wrote:

yesssss yes yes

— Reply to this email directly or view it on GitHub.

snailbites commented 9 years ago

sick Js

snailbites commented 9 years ago

built off your code and added similar support for links @adamhenson

adamhenson commented 9 years ago

Awesome @snailbites