banyan / react-emoji

An emoji mixin for React
MIT License
197 stars 40 forks source link

URIs not escaped #11

Open gwendall opened 8 years ago

gwendall commented 8 years ago

If I pass to this.emojify() a URI that includes a query param like p=param, the =p segment is interpreted as an emoji. Is there a built-in way to avoid that?

banyan commented 8 years ago

@gwendall

Hi! The easy way is change useEmoticon as false. Otherwise we need to have option to guard some specific word.

banyan commented 8 years ago

Let me think if this library should recognize when the given word is URL or not.

banyan commented 8 years ago

@gwendall

If the spec is allowed a link as clickable, you may use react-autolink: https://github.com/banyan/react-emoji/issues/1#issuecomment-89669890 What do you think?

maksis commented 8 years ago

There are also lots of other false matches (such as C:\folder). Maybe you could require the emoji to be surrounded with separator (or non-visible) characters?

banyan commented 8 years ago

There are also lots of other false matches (such as C:\folder). Maybe you could require the emoji to be surrounded with separator (or non-visible) characters?

Agreed.