Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing fails with unicode chars followed by a URL #1161

Closed
agis opened this issue Nov 17, 2016 · 3 comments · Fixed by #1213
Closed

Parsing fails with unicode chars followed by a URL #1161

agis opened this issue Nov 17, 2016 · 3 comments · Fixed by #1213
Assignees
Labels

Comments

@agis
Copy link
Member

agis commented Nov 17, 2016

The following example demonstrates (ignore the messages from slackbot):

image

While Cog executed the first command, it didn't execute the second.

Happens on 0.16.1 and in the Cog running in http://cogbot.slack.com.

@agis agis changed the title Parser explodes with unicode chars followed by a URL Parser fails with unicode chars followed by a URL Dec 2, 2016
@agis agis changed the title Parser fails with unicode chars followed by a URL Parsing fails with unicode chars followed by a URL Dec 2, 2016
@kevsmith
Copy link
Member

kevsmith commented Dec 2, 2016

Preliminary debugging confirms Cog's parser isn't mangling multi-byte Unicode characters. The failure must be happening further along pipeline processing.

I'm using this page for Greek character input.

@vanstee
Copy link
Member

vanstee commented Dec 6, 2016

Confirmed on master that echo "ϻ https://google.com" crashes with the following error:

2016-12-06T15:33:53.583 module=Cog.Chat.Slack.Connector line=3 [error] no case clause matching: nil
2016-12-06T15:33:53.585 module=Cog.Chat.Slack.Connector line=3 [error]     (cog) lib/cog/chat/slack/formatter.ex:51: anonymous fn/1 in Cog.Chat.Slack.Formatter.unescape_links/1
    (cog) lib/cog/chat/slack/formatter.ex:66: Cog.Chat.Slack.Formatter.replace/3
    (cog) lib/cog/chat/slack/connector.ex:282: Cog.Chat.Slack.Connector.annotate_message/2
    (cog) lib/cog/chat/slack/connector.ex:39: Cog.Chat.Slack.Connector.handle_message/2
    (cog) lib/cog/chat/slack/connector.ex:3: Cog.Chat.Slack.Connector.websocket_handle/3
    src/websocket_client.erl:384: :websocket_client.retrieve_frame/6
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

@agis
Copy link
Member Author

agis commented Dec 7, 2016

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants