When the second word of the cover message is an emoji, on certain occasions the hidden message will break.
For example, if I want to hide the message "done" with the message Mhhh :shibathink: *done* the result is as follows:
I also tried to hide the message "ok" with so :AquaInspect: mhh *ok* and the result:
With a longer message Alright :ablobnod: will it work *or will it fail?*:
Usually, the last character is altered/deleted (or last few characters) and in some occasions the whole hidden message is reduced to nothing, as if no message was hidden. However, sometimes, nothing bad happens, so it's a bit of a gamble.
What I've understood is that when I type a message, like Mhhh :shibathink: *done*, the text that the reveal worker will get is Mhhh (with a trailing space) instead of Mhhh :shibathink: and that's what's breaking some messages.
In fact, it seems to work fine when I make the revealWorker get the innerHTML of the message instead of the textContent in the addHiddenMessageBanners method.
After fiddling a bit with the code, I came up with this possibly more elegant fix in addHiddenMessageBanners where the const textContent is initialized:
When the second word of the cover message is an emoji, on certain occasions the hidden message will break.
For example, if I want to hide the message "done" with the message
Mhhh :shibathink: *done*
the result is as follows:I also tried to hide the message "ok" with
so :AquaInspect: mhh *ok*
and the result:With a longer message
Alright :ablobnod: will it work *or will it fail?*
:Usually, the last character is altered/deleted (or last few characters) and in some occasions the whole hidden message is reduced to nothing, as if no message was hidden. However, sometimes, nothing bad happens, so it's a bit of a gamble.
What I've understood is that when I type a message, like
Mhhh :shibathink: *done*
, the text that the reveal worker will get isMhhh
(with a trailing space) instead ofMhhh :shibathink:
and that's what's breaking some messages.In fact, it seems to work fine when I make the revealWorker get the innerHTML of the message instead of the textContent in the
addHiddenMessageBanners
method.After fiddling a bit with the code, I came up with this possibly more elegant fix in
addHiddenMessageBanners
where theconst textContent
is initialized:The result is
textContent
having the proper:emoji:
text: