HabitRPG / habitica-chat-extension

A habitica.com Chat Client for Chrome
18 stars 13 forks source link

Firefox bugs: can't copy Username, buttons don't work, CTRL-Enter doesn't send #55

Closed Alys closed 4 years ago

Alys commented 4 years ago

@Nakonana (33bb14bd-814d-40cb-98a4-7b76a752761c) reported the problems below on Windows 10, Firefox 74.0. I also see them on Ubuntu 18.04, Firefox 73.01.

"... I can't copy the username by clicking on it, the buttons don't work (copy, delete, report, like, info), CTRL+enter does not send messages...

"I tried reloading the page, disabling avatars, reducing message count limit to 50,12h time format, changing date format, and disabling all my other extensions but nothing changed.

"My extension settings are: use sound, use large text, confirm before deleting messages, minimize group list on load, message count limit = 200, pause chat after 60 minutes, date format: d-mm-yyyy, 24h time if that's of any help"

benjaminbhollon commented 4 years ago

This is also happening for me in Brave (Chromium-based, so probably in Chrome too). I'll work on it.

benjaminbhollon commented 4 years ago

Okay, it looks like it's the DOMPurify thing that the Firefox people requested that's breaking things. I'll look for a workaround that doesn't remove it so they won't get angry at us.

CraigInches commented 4 years ago

dompurify is doing its job, and stripping all the unsafe elements from the strings, unfortunately that includes the onclick events. Are you still looking at this @benjaminbhollon ? We should be able to overide the config too allow the elements needed, or add them to our copy of the purify.js

benjaminbhollon commented 4 years ago

Yeah, I'm still working on it. I've had to take a break because I've been pretty busy with everything going on right around now.

CraigInches commented 4 years ago

Do you mind if I take a crack at it since your tied up with other things?

benjaminbhollon commented 4 years ago

Sure, if you'd like!

CraigInches commented 4 years ago

https://github.com/HabitRPG/habitica-chat-extension/pull/58