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

Links with complicated hashes aren't fully linkify-ed #8

Open
mattfeury opened this issue Jan 14, 2014 · 1 comment
Open

Links with complicated hashes aren't fully linkify-ed #8

mattfeury opened this issue Jan 14, 2014 · 1 comment

Comments

@mattfeury
Copy link

I see this mostly with using Mixpanel, where we get links like:

https://mixpanel.com/report/1234/funnels/#view/1234/from_date:0,segfilter:(filters:!((filter:(operand:!(app,App),operator:%3D%3D),property:utm_medium,selected_property_type:string,type:string),(property:ab-test-01-08-14,selected_property_type:string,type:string)),op:and),segment_type:string,to_date:0

for sharing analytics tools. flowdock links it as:

https://mixpanel.com/report/1234/funnels/#view/1234/from_date:0,segfilter:(filters:!((filter:(operand:!(app,App),operator:%3D%3D),property:utm_medium,selected_property_type:string,type:string),(property:ab-test-01-08-14,selected_property_type:string,type:string)),op:and),segment_type:string,to_date:0

haven't looked at this code much. if someone can drop me some pointers to where this is in the code, I can try and take a look.

phadej added a commit to phadej/flowdock-text that referenced this issue Feb 4, 2014
phadej added a commit to phadej/flowdock-text that referenced this issue Feb 4, 2014
@phadej
Copy link
Contributor

phadej commented Feb 4, 2014

There url are matched with a regular expression, which is combined with a small helper "library":
the final one is on line 233

The match groups aren't really used for anything. The whole match is used only, but there are lot's of corner cases which makes the regexp quite complicated.

† for example:

  • don't eat dot or comma after the link,
  • or don't allow & before ?
  • allow only matching pairs of parentheses in url's "path" part, so currently nested parentheses aren't allowed anyway

I added your case and few additional simpler cases, so you could give a try in fixing the regexp, without breaking other tests :)

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

No branches or pull requests

2 participants