twitter-text
twitter-text copied to clipboard
JS: autoLinkWithJson mutates one the json input param
The json parameter passed into autoLinkWithJSON gets mutated here: https://github.com/twitter/twitter-text/blob/master/js/twitter-text.js#L683
The means that if you have tweet text with emoji at the start, and some links / usernames after the emoji, and call autoLinkWithJSON with the text and entities twice, it'll give you a different result each time.
Ok, I'm looking for a fix today, and am able to reproduce. Thanks.
My references: Emoji tweet example: https://twitter.com/wazatreee/status/586654259661250561 Original issue: https://github.com/twitter/twitter-text-js/pull/123
Any idea when this will be resolve? My new project http://🍕💩.ws will be sending a lot of emoji links to Twitter.
I'm also looking for a fix to this.