urlencode

how to pass input element value to javascript after urlencoding it using php

I've an input text field. On press enter, i'm performing the following action function doWork(){ httpObject = getHTTPObject(); if (httpObject != null) { link = "message.php?nick="+nickName+"&msg="+document.getElementById('msg').value; httpObject.open("GET", link , true); httpOb...

Is CDATA supposed to be URL-encoded?

Obviously the answer is no... right? The reason I ask is because I have this string defined in XML for an Android app: <string name="foo"><![CDATA[<html><body><p>This%20is%20a%20test</p></body></html>]]></string> All I do to the string is read it, and display in an HTML view. I would not have expected the %20s to be interpreted, yet t...

Codeigniter is "catching" url charcters even though they've been urlencoded

I'm having the strangest issue with codeigniter. I have a site that has a search feature which displays the person's query in the url so that they can save the url. I make sure that the query text has gone through rawurlencode before I stick it in the url. However, Codeigniter still shoots me to an error page when there's a character i...

URL decoding not working as expected

Hi All, My Browser shows URL with file name as http://www.example.com/pdf/204177_20090604_Chloorhexidine_DCB_oogdruppels_0%2C1%25.pdf Actual File name is 204160_20090604_Atropine_DCB_oogdruppels_0,5%.pdf After urldecode, it gives wrong file name as http://www.example.com/pdf/204177_20090604_Chloorhexidine_DCB_oogdruppels_0,1%.pdf ...

Are %20 and + the same in a http url?

I know that %20 and + both decode to the same binary value (a space), and for most webservers, especially those that map to physical files they will point to the same resource. But my question is, must a url like http://www.example.org/hello%20world point to the same resource as http://www.example.org/hello+world, are they canonically t...

Python urllib urlencode problem with æøå

Hey .. How can I urlencode a string with special chars æøå? ex. urllib.urlencode('http://www.test.com/q=testæøå') I get this error :(.. not a valid non-string sequence or mapping object ...

How to get Microsoft's AntiXss library to URLEncode to the URI standard (RFC3986) instead of an IRI (RFC3987)?

I'm using the Microsoft AntiXss 3.1 library. We have a number of international sites which use non-Latin scripts. We're using SEO-friendly URL's, so we have non-ASCII characters that end up in the URL. AntiXss.UrlEncode (at least in 3.1) treats "international characters" as safe, so we end up with an IRI instead of a URI: http://somesi...

urlencode a multidimensional dictionary in python

How can I get a URL-encoded version of a multidimensional dictionary in Python? Unfortunately, urllib.urlencode() only works in a single dimension. I would need a version capable of recursively encoding the dictionary. For example, if I have the following dictionary: {'a': 'b', 'c': {'d': 'e'}} I want to obtain the following string: ...

Why does grails URL params decoding behave differently on server vs. local

Let's say I have the following entry in my grails URLMappings.groovy: "/actionName/param1"(controller:'myController', action:'myAction') When I call an URL where param1 includes + as a special character, the URL is encoded correctly to /actionName/my%2Bparam for example, both in my local and in my server environment. In my local envi...

How to avoid default URL encoding in ASP.NET MVC Html Helpers like RouteLink

I want my url like this: "http://domain.com/tag/高兴" My route mapping: routes.MapRoute("Tag", "tag/{name}", new { controller = "Tag", action="Index" }); But Html.RouteLink will encode the parameters as default. If I use Html.RouteLink in my View, the generated html is: <a href="/tag/%E9%AB%98%E5%85%B4">高兴</a> Is there any way to a...

php, urldecode() and the umlaut - ö

Hi All, Using PHP 5.3.2, I'm having trouble with handling a request for a page whose name has an umlaut in it: ö Making the request using Firefox + Live HTTP Headers for the test_ö_test.htm page, I can see firefox automatically converts/encodes the umlaut when it makes a request: GET /test_%C3%B6_test.htm HTTP/1.1 Now, using http://...