Im generating URLs for my AdWord campaigns and some campangin names have brackets in them ( )
and [ ]
brackets. And a sample url looks likes this
http://www.website.com/?utm_source=google%5BB%2B%5D&utm_medium=cpc&utm_content=google_ad(B)&utm_campaign=product
Is this fine?
Braces or curly brackets { } are used when the domain or range consists of discrete numbers and not an interval of values. If the domain or range of a function is all numbers, the notation includes negative and positive infinity . If the domain is all positive numbers plus 0, the domain would be written as .
3. Brackets are used to enclose parenthetical materials within the parentheses while parentheses are used to enclose words, numbers, phrases, sentences, symbols, and other items in a sentence.
URI path templates are URIs with variables embedded within the URI syntax. These variables are substituted at runtime in order for a resource to respond to a request based on the substituted URI. Variables are denoted by curly braces. For example, look at the following @Path annotation: @Path("/users/{username}")
Parentheses “()” may be used as such in the query part of URL (i.e., the part after “?”). It is allowable, but not necessary, to %-encode them, as “%28” and “%29”.
Brackets “[]” shall be %-encoded, as “%5B” and “%5D”, in the query part.
The sample URL, which is a real URL as www.website.com actually exists (please use www.example.com as a dummy domain name, it is guaranteed to not exist), is thus correctly formed.
The general rules for URL syntax are defined in Internet-standard STD 66, which is currently RFC 3986. Its Appendix A specifies the rules for characters, listing parentheses as belonging to the “sub-delims” group which is allowed without %-encoding in the query part but the brackets as belonging to “gen-delims” which shall be %-encoded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With