Closed Abdelhady closed 6 years ago
I'm using the following code to translate emojis to their images:
function convert() {
var input = document.getElementById('inputText').value;
var output = emojione.unicodeToImage(input);
document.getElementById('outputText').innerHTML = output;
}
using your latest version 3.1.6
(https://demos.emojione.com/latest/jsunicodetoimage.html)
even i am facing the same problem..
can some one help out.. Thank you in advance..
Yeah, we have the same problem. Apparently with minor release 3.1.5 this was introduced. For now we downgraded to 3.1.4 which doesn't have the problem. All digits are also affected btw.
Same issue on our end, downgrade to 3.1.4 helps for the moment
@EmojiOne I understand that this "issue" is actually an feature but then you should have introduced this into a major/minor version and not as a patch version because this is now a breaking change...
If i downgrade from 3.1.6 to 3.1.4. I am facing the below problem. Any solution will be appreciated.
If you have been using the toShort() function with markdown, I highly recommend doing a manual check what else this function has broken. For us this broke our whole markdown, mentions, links, everything that had numbers and special characters, and of course in web app + in mobile app.
We are currently doing a migration function to revert every character this library has converted in our DB since the bug was introduced. Here's a short snippet for anyone who needs to do some quick replacing of the most crucial markdown characters in Javascript:
var convertEmojioneBug = [
[":digit_one:",1],
[":digit_two:",2],
[":digit_three:",3],
[":digit_four:",4],
[":digit_five:",5],
[":digit_six:",6],
[":digit_seven:",7],
[":digit_eight:",8],
[":digit_nine:",9],
[":digit_zero:",0],
[":asterisk_symbol:","*"],
[":pound_symbol:","#"] // And yes, this is correct... :pound_symbol: = #, because why not
]
function _fixEmojioneBug(content) {
_.forEach(convertEmojioneBug, function(fix) {
var regex = new RegExp(fix[0], 'g');
content = content.replace(regex,fix[1]);
})
return content;
}
These bugs are repaired in today's 3.1.7 release. Our apologies for the trouble this oversight caused.
I'm using the following code to translate emojis to their shortnames:
using your latest version
3.1.5
now if I used this function like:
getShortText("Hello #world from Mr.*")
I get this response
Hello :pound_symbol:world from Mr.:asterisk_symbol:
while I should get the following text instead:Hello #world from Mr.*
& I read the
Client()
&Ruleset()
sourcecodes & I can't find anything to disable this weird behavior !!