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

slashes shouldn't be supported in hostnames #6

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

slashes shouldn't be supported in hostnames #6

snarfed opened this issue Apr 10, 2017 · 2 comments

Comments

@snarfed
Copy link
Collaborator

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
Copy link
Collaborator Author

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 as completed in 8aff70c Apr 23, 2017
@snarfed
Copy link
Collaborator Author

snarfed commented Apr 24, 2017

woo, thanks for the bug fixes!

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