Has anyone ever used Go Integrator that Nextiva provides to send encoded urls? I have it sending a formatted variable to show the callers phone number, but any percent symbols get changed to an invalid code. Example:
websiteaddress.com/search?query=fieldvalue%3A%%Call\Contact\DisplayTel%
fieldvalue requires the colon (%3A) after to properly search the variable passed, and I added a % after %3A as without the extra % it would send the link but remove all the % symbols for the variable (Call\Contact\DisplayTel rather than the variable 916-555-1234).
For some reason when I send the URL it encodes the %3A as %03 instead, giving me a weird ASCII placeholder, showing this URL instead:
websiteaddress.com/search?query=fieldvalue%03916-555-1234
Any help would be appreciated
Figured it out. Go Integrator wants the actual characters and NOT pre-encoded URL's. Thus, the link should show:
websiteaddress.com/search?query=fieldvalue:%Call\Contact\DisplayTel%
Related
I am creating a new event in google calendar by the following URL structure.
https://calendar.google.com/calendar/r/eventedit?
text=discount for Asgardian&
dates=20200327T032400Z/20200327T032400Z&
details=Thor will be there to receive you&
location=Asgard&
trp=false&sprop=&sprop=name:
here is a URL variable text, which represents the title of an event.
if I pass a plain string, it works well. but if I pass special character like '%' (e.g. 20% off for Asgardian), then google calendar gave me -
Bad Request
Error 400
how can I pass '%'?
(same error for details vaiable also)
in the comment, #terry gave me answer for how to pass % through URL.
I need to encode it as %25.
he also share that - Javascript has a built-in function for this URL encoding. encodeURIComponent()
if we wrap our string by encodeURIComponent(), it'll give us URL encoded string.
thanks.
I'm working on QlikView and there is requirement that a URL would be generated using the filters that I have selected in QV and then it would be parse to another application. The url contains the values that I have selected in QV. We are facing an issue due to the and apostrophe (') in the user name.
Below is url generated. You could see, the generated url is not completely treated as a URL due to the apostrophe.
http://abcworld.com/berlin/cgi-bin/berlinisapi.dll?b_action=berlinViewer&ui.action=run.prompt=false&p_Type=E&p_Tra=Paul O'Donnell&p_AdjType=O&p_UD=2014-08-11
How to overcome this issue? Is there any special character that I could replace it with?
Thanks in advance.
You would want to encode the apostrophe as %27. This is called URL Encoding and is useful when you need to insert characters in a URI that can't normally be represented in a URI, or otherwise have special meaning, like a question mark. Spaces are often encoded as %20. So your final URL might be:
http://abcworld.com/berlin/cgi-bin/berlinisapi.dll?b_action=berlinViewer&ui.action=run.prompt=false&p_Type=E&p_Tra=Paul%20O%27Donnell&p_AdjType=O&p_UD=2014-08-11
I've tried using a few web pages to create QR code to create a QR for a regular url and they fine.
However, if I had parameters to the url, the resulting url does not decode properly.
If you try this
http://chart.apis.google.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=H&chl=http://localhost?someparam=1&someotherparam=2
instead of the QR code pointing to http://localhost?someparam=1&someotherparam=2
the Barcodescanner decoder apps on Android and iPhone point to
http://localhost/?someparam=1&someotherparam=2
The forward slash / between what would be the server name (domain name) and the start of the parameter string is obviously incorrect.
I'm assuming that it's something to do with url encoding and I'm just looking for a pointer in the right direction from someone who might had already cracked this nut.
Zxing's QR code generator has the same effect. But it seems to rely on Google also.
http://zxing.appspot.com/generator/
Also
http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/sample.html
You need to URL-encode each parameter value, in your example, the chl parameter in particular. Most languages have libraries for this these days or a web search for "url encoder " will give you a form.
The url encoding of http://localhost?someparam=1&someotherparam=2 is http%3A%2F%2Flocalhost%3Fsomeparam%3D1%26someotherparam%3D2.
Also, any parameter values to a URL that is itself a parameter value have to be independently URL encoded as well.
As Sean mentions below, if you enter your URL into the form on the appspot page, it correctly URL encodes the chart url:
http://chart.apis.google.com/chart?cht=qr&chs=350x350&chld=L&choe=UTF-8&chl=http%3A%2F%2Flocalhost%3Fsomeparam%3D1%26someotherparam%3D
I'm not sure about your extra / comment. If you go to the URL you give, the code value is
http://localhost?someparam=1
which is what is expected because the chl parameter value is not escaped and therefore ends at the first &.
In Rails 3 (Ruby 1.9.2) I send an request
Started GET "/controller/action?path=/41_+"
But the parameter list looks like this:
{"path"=>"/41_ ",
"controller"=>"controller",
"action"=>"action"}
Whats going wrong here? The -, * or . sign works fine, its just the +which will be replaced by a space.
That's normal URL encoding, the plus sign is a shorthand for a space:
Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. This method was used to make query URIs easier to pass in systems which did not allow spaces.
And from the HTML5 standard:
The character is a U+0020 SPACE character
Replace the character with a single U+002B PLUS SIGN character (+).
For POST-requests, (in case that's how some of you stumbled upon this question, like me) one might encounter this problem because one has encoded the data in the wrong way on the client side. Encoding the data as application/x-www-form-urlencoded will tell rails to decode the data as it decodes a URL, and hence replace + signs with whitespace, according to the standard RFC1738 as explained by #mu is too short
The solution is to encode the data on the client side as multipart/form-data.
In PHP, using cURL, this is done by taking into consideration the following gotcha:
Passing an array to CURLOPT_POSTFIELDS will encode the data as
multipart/form-data, while passing a URL-encoded string will encode
the data as application/x-www-form-urlencoded. http://php.net/manual/en/function.curl-setopt.php
You might wonder why I was using PHP on the client side (that's because the client in my example was another webserver, since I'm working on an API connection.)
My app is sending users email with the following:
https://blah.chacha.com/feedback/##comment-reply-169
But for some reason, sometimes when the URL is loaded in some of the user's browsers the ## are being converted to something like:
https://blah.chacha.com/feedback/#%23comment-reply-169
Any ideas what's going on here and why?
The # character isn’t valid in a fragment identifier, so it’s being escaped automatically. You should either avoid using that character inside a fragment, or explicitly unescape the value before using it.