CyberChat Chatroom
h
RohilPatel (807)

Well, I made another chat, like the socket.io one, except better! This one, instead of having those bogus alert prompts, we made a second page. We used localStorage too! Have fun people!

You are viewing a single comment. View All
PDanielY (981)

Not to hate, but this is really unsafe. Anyone could enter HTML in the chat input and it will render it as html

Edit: The owner fixed it I think

RohilPatel (807)

Oh crap, forgot to change that @PDanielY

RohilPatel (807)

Also, then, how would I use html to add styles? @PDanielY

RohilPatel (807)

Now I'm using text. How can I still use html tho? @PDanielY

PDanielY (981)

@RohilPatel you can use document.createElement then set attributes with document.setAttributes and append to body or div with the append function

[deleted]

@PDanielY NOOOOO
I CANT ABUSE MY POWER

also nice youtube channel