Hacker News new | past | comments | ask | show | jobs | submit login

Would someone please fix the forum system so that when you put a URL in quotes, it doesn't think the trailing quote is part of the URL?



The quote sign is a legit character in a URL. That is, a valid URL can end with a quote sign character. I don't think ignoring it would be a good idea.


This is not the case. In fact, the double-quote (along with angle brackets) is explicitly excluded from valid URL/URIs because it is used as a delimiter, as the GP post did: http://tools.ietf.org/html/rfc1738#section-2.2 http://tools.ietf.org/html/rfc2396#appendix-E


That's interesting. Before my previous reply I appended a quote sign in my browser's address bar (in this page) and pressed "enter", expecting it to turn into %22 in case it's not supposed to be there but the quote sign remained intact; that's why I posted my reply without checking the RFCs.


The tilde (~) is also invalid in a URL according to the RFC, but that doesn't stop everyone for using it for user names. I doubt your browser will escape that one either.


Basic HTML:

<a href="http://www.example.com">

So no, you can't use a quote mark in a URL without escaping it.


Try this: <a href='http://www.example.com/"'>


Aargh! The forum system actually sent a path of

">

to the server.


I don't think the commenting system is meant to process html. Perhaps it is a very loose regex of (http(s)?://.*)\s or whatever (sorry I didnt check to see thats valid!)

<a href='http://www.example.com/"'>¯\_(ツ)_/¯</a>


What OS/browser pair are you using?


Or don't put quotes around a URL? Why would you do that anyway, are you suggesting they aren't real websites?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: