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

slashes shouldn't be supported in hostnames #6

Closed
snarfed opened this Issue Apr 10, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@snarfed
Contributor

snarfed commented Apr 10, 2017

hey kyle! looks like brevity currently allows slashes in hostnames when detecting links:

>>> brevity.autolink('/var/www/doubleloop.net/public_html/xyz.php')
u'/var/www/<a class="auto-link" href="http://doubleloop.net/public_html/xyz.php">doubleloop.net/public_html/xyz.php</a>'

this makes truncating interpret those strings as links, while twitter correctly doesn't.

thanks in advance! hope you're good!

@snarfed

This comment has been minimized.

Contributor

snarfed commented Apr 10, 2017

looks like brevity currently allows slashes in hostnames when detecting links:

...er, more precisely, it allows links directly after some punctuation chars that twitter doesn't, like /.

i did some testing. twitter evidently allows links to start after ( ) [ ] < > { } = + | % ^ ~ ` & * : ; , ? ! ' ", but not after @ # $ / - _ ..

kylewm added a commit to kylewm/brevity-testcases that referenced this issue Apr 23, 2017

@kylewm kylewm closed this in 8aff70c Apr 23, 2017

@snarfed

This comment has been minimized.

Contributor

snarfed commented Apr 24, 2017

woo, thanks for the bug fixes!

snarfed added a commit to snarfed/granary that referenced this issue Apr 24, 2017

snarfed added a commit to snarfed/bridgy that referenced this issue Apr 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment