Can you use an exclamation mark in a url




















They do. But they use it after the hashtag which denotes an object on the page you loaded. This is supported by all of your browsers and most CMSs because it is valid, at least according to the specs. On the other hand, characters that are not required to be encoded including alphanumerics may be encoded within the scheme-specific part of a URL, as long as they are not being used for a reserved purpose. For much of JavaScript's life, it was a browser-only programming language and could not run on the server-side like it can now.

Because of this, JS has a lot of built-in functions that are specific to browser-side functions, like encoding strings for use in URLs. Some of the most commonly used functions are:.

So, for example, the percent-encoding representation of the exclamation mark! In terms of use-cases, let's say your website has a search bar and the queries entered there are used to construct a URL like this:. Though I May have an old version of the rfc. I would of imagined this has been brought up but after a search couldn't find it so thought I'd mention it. It does appear from that RFC and everything else I could find that it's a reserved character.

So I guess Microsoft is just breaking the rules again. I had a quick google search before. And couldn't find anything on it. But to find out which RFC is current is harder than understanding it once you've got your hands on it. I wouldn't be surprised looking at the url if Microsoft is attempting to change? It really isn't that hard to figure out what is allowed, simply look at the BNF for the syntax. Now we've actually discussed this before and the determination was that the auto linker should make a best guess and not try to be perfect.

This is because users aren't perfect and may end a url with punctation. Go Up Pages 1.



0コメント

  • 1000 / 1000