Search Results

Search found 242 results on 10 pages for 'urlencode'.

Page 2/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • problem with image urls in htmlhelp created by docbook xsl

    - by newenglander
    I have a Docbook XML document that has some images with special characters in their names (German umlauts). I'm using Saxon 6.5.5 and the Docbook xslt Stylesheets to create HTMLHelp files based on that document. Unfortunately the filenames are then url-encoded (% and hexadecimal code), which internet explorer can't deal with (with firefox it works). I looked for a parameter which could change this feature, but couldn't find any. I also tried to save my image files using the encoded names, but this didn't work either. Does anyone know a good way around this, or will I have to simply forbid special characters in my image names?

    Read the article

  • URL Encoding using C#

    - by masfenix
    I have an application which I've developed for a friend. It sends a POST request to the VB forum software and logs someone in (with out setting cookies or anything). Once the user is logged in I create a variable that creates a path on their local machine. c:\tempfolder\date\username The problem is that some usernames are throwing "Illegal chars" exception. For example if my username was mas|fenix it would throw an exception.. Path.Combine( _ Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData), _ DateTime.Now.ToString("ddMMyyhhmm") + "-" + form1.username) I don't want to remove it from the string, but a folder with their username is created through FTP on a server. And this leads to my second question. If I am creating a folder on the server can I leave the "illegal chars" in? I only ask this because the server is Linux based, and I am not sure if Linux accepts it or not.. EDIT: It seems that URL encode is NOT what I want.. Here's what I want to do: old username = mas|fenix new username = mas%xxfenix Where %xx is the ASCII value or any other value that would easily identify the character.

    Read the article

  • Problem in IE8 with GET Parameters in opening a new windows with javascript.

    - by amfa95
    Hi, I have a problem with IE8 and the opening of a new window with javascript and submitting parameters with special characters. <a href="javascript:oWin('/html/de/4664286/printregistrationcontent.html?12-security question&#61;Wie hei&#223;t Ihr Lieblingsrestaurant','PRINT',800,600);" class="print">Seite drucken</a> The Problem is the letter 'ß' (sharp S). As you can see the string above is encodes due to anti XSS. This link works in FF and IE6 but IE8 is transmitting the URL Parameter as character with code 65*** (don't know the exaxt value). In the opening window you will only see a square (because character with 65000+ is not printable). I also tried to use URL Encoding instead of HTML encoding <a href="javascript:oWin('/html/de/4664286/printregistrationcontent.html?12-security question%3DWie hei%C3%9Ft Ihr Lieblingsrestaurant','PRINT',800,600);" class="print">Seite drucken</a> If i click on this Link in FF or IE6 it works as expected, but IE8 will fail to transmit the "ß" to the server and therefor will also get it back in the wrong way. If i paste this url to the IE8 it will work too, but not if the window is opened by javascript. The Javascript function oWin is defined as follows function oWin(url,title,sizeH,sizeV) { winHandle = top.open(url,title,'toolbar=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=no,width='+sizeH+',height='+sizeV); if(navigator.appVersion.indexOf("MSIE 3",0)==-1) id = setTimeout('winHandle.focus()',1000); } If someone has an idea where to look for the reason please answer to this. Thank you amfa

    Read the article

  • ASP.NET MVC - creating and handling with URLs with Greater Than and Less Than characters

    - by pcampbell
    Consider a link to a page for a user's profile. A page is creating that URL like this: //Model.Name has value "<bad guy>" Html.ActionLink("foo, "ViewUser", new { id=5, title=Url.Encode(Model.Name) }) The actual outcome was http://mysite/Users/5/%253cbad%2guy%253e When navigating to that URL, the server generates a HTTP Error 400 - Bad Request. Question: Given that the Model.Name may contain Unicode characters, or characters otherwise illegal in URLs, what's the best way to strip out illegal characters, or otherwise encode them? The problem surfaces when testing out 'interesting' user inputs with < and >, but anything could come from the user, and therefore be put in a URL by way of Model.Name.

    Read the article

  • How can I send a GET request containing a colon, to an ASP.NET MVC2 controller?

    - by Cheeso
    This works fine: GET /mvc/Movies/TitleIncludes/Lara%20Croft When I submit a request that contains a colon, like this: GET /mvc/Movies/TitleIncludes/Lara%20Croft:%20Tomb ...it generates a 400 error. The error says ASP.NET detected invalid characters in the URL. If I try url-escaping, the request looks like this: GET /mvc/Movies/TitleIncludes/Lara%20Croft%3A%20Tomb ...and this also gives me a 400 error. If I replace the colon with a | : GET /mvc/Movies/TitleIncludes/Lara%20Croft|%20Tomb ..that was also rejeted as illegal, this time with a 500 error. The message: Illegal characters in path. URL-escaping that | results in the same error. I really, really don't want to use a querystring parameter. related: Sending URLs/paths to ASP.NET MVC controller actions

    Read the article

  • UrlEncoding-Safe Delimiter

    - by Aren B
    So the site I'm working on has a filter system that operates by passing a key and value system through a querystring. The whole site is going through a re-factor soon and I'm maintaining the existing site so before we discuss the RIGHT way to implement this, I just need ideas for changing my delimiter. The current format is like this: cf=<key>:<value> The problem is, I've recently run into an issue because some of our new values for this filter contain : in them. I.e: cf=MO_AspectRatio:16:10 The value is being UrlEncoded, but the browsers are de-coding %3a into : on the fly because the : doesn't inherently break the urls. I need some suggestions for url-safe delimiters that aren't :,-,_,&,? that makes sense. I'm not looking for a solution like () or something wild.

    Read the article

  • using nested arrays by php http_build_query() and recieve them in flash AS3

    - by Mahmoud
    hi, i am having this hard time figuring what is needed to do, i am using URLVariables to send/recieve values between flash and PHP the problem is, i am unable to access nested arrays ( array inside an array ) with flash heres an example: $dgresult = array("total" = $results); echo http_build_query($dgresult,"flf_"); in flash, all i need to do is to use: var variables:URLVariables = new URLVariables(e.target.data); then i can access it with : variables.total the problem now is when i have nested arrays: $dgresult = array("total" = $results); array_push($dgresult,$another_array); http_build_query($dgresult,"flf_"); i can still access variables.total but what about anything that has flf_ ? how is that possible?

    Read the article

  • Url encode and routing?

    - by Curtis White
    I'm using custom routing in a web forms context. I have some titles (part of my custom route) that have say a question mark character. When I URL encode this text ("Question?") and then pass into my route, I get an HTTP ERROR CODE 400. Apparently, the URL encoded text is somehow confusing the routing manager. Can someone provide context and explanation for this? Beyond that, I'm thinking I don't need to URL encode these route data but merely strip out the problem characters. Are there any security risks to not using URL decode/encode? And what are the problem characters? A list would be useful. Thanks!

    Read the article

  • JS encodeURIComponent result different from the one created by FORM

    - by Marco Demaio
    I thought values entered in forms are properly encoded by browsers. But this simple test shows it's not true: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title></title> </head><body> <form id="test" action="test_get_vs_encodeuri.html" method="GET" onsubmit="alert(encodeURIComponent(this.one.value));"> <input name="one" type="text" value="Euro-€"> <input type="submit" value="SUBMIT"> </form> </body></html> When hitting submit button: encodeURICompenent encodes input value into "Euro-%E2%82%AC" while browser into the GET query writes only a simple "Euro-%80" Could somone explain? Or is encodeURIComponent doing unnecessary conversions?

    Read the article

  • What is the proper way to URL encode Unicode characters?

    - by Josh Gibson
    I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C. Some interesting examples: The heart character. If I type this into my browser: http://www.google.com/search?q=? Then copy and paste it, I see this URL http://www.google.com/search?q=%E2%99%A5 which makes it seem like Firefox (or Safari) is doing this. urllib.quote_plus(x.encode("latin-1")) '%E2%99%A5' which makes sense, except for things that can't be encoded in Latin-1, like the triple dot character. … If I type the URL http://www.google.com/search?q=… into my browser then copy and paste, I get http://www.google.com/search?q=%E2%80%A6 back. Which seems to be the result of doing urllib.quote_plus(x.encode("utf-8")) which makes sense since … can't be encoded with Latin-1. But then its not clear to me how the browser knows whether to decode with UTF-8 or Latin-1. Since this seems to be ambiguous: In [67]: u"…".encode('utf-8').decode('latin-1') Out[67]: u'\xc3\xa2\xc2\x80\xc2\xa6' works, so I don't know how the browser figures out whether to decode that with UTF-8 or Latin-1. What's the right thing to be doing with the special characters I need to deal with?

    Read the article

  • Double encoded url being fully decoded in ASP.NET

    - by Brad R
    I have just come across something that is quite strange and yet I haven't found any mention on the interwebs of others having the same problem. If I hit my ASP.NET application with a double encoded url then the Request["myQueryParam"] will do a double decode of the query for me. This is not desirable as I have double encoded my query string for a good reason. Can others confirm I'm not doing something obviously wrong, and why this would happen. A solution to prevent it, without doing some nasty query string parsing, would be great too! As an example if you hit the url: http://localhost/MyApp?originalUrl=http%3a%2f%2flocalhost%2fAction%2fRedirect%3fUrl%3d%252fsomeUrl%253futm_medium%253dabc%2526utm_source%253dabc%2526utm_campaign%253dabc (For reference %25 is the % symbol) Then look at the Request["originalUrl"] (page or controller) the string returned is: http://localhost/Action/Redirect?Url=/someUrl?utm_medium=abc&utm_source=abc&utm_campaign=abc I would expect: http://localhost/Action/Redirect?Url=%2fsomeUrl%3futm_medium%3dabc%26utm_source%3dabc%26utm_campaign%3dabc I have also checked in Fiddler and the URL is being passed to the server correctly (one possible culprit could have been the browser decoding the URL before sending).

    Read the article

  • GWT: library for encoding/decoding arbitrary data in URL fragments

    - by Caffeine Coma
    Ajax applications, and GWT in particular, use the URL fragment (e.g. http://example.com/myapp#fragment) to maintain application state on the client without reloading the page. Is there a GWT library that facilitates the encoding and decoding of arbitrary parameters into the URL fragment? I'm looking for something analogous to the Servlet API's getParameter() method, but for client-side URL parameters.

    Read the article

  • URL Encoding of Characters in a password field

    - by Alavoil
    I am trying to pass login credentials to a PHP script that I have in my iPhone app. When I pull a password with special characters the password is missing certain characters especially the percent sign. I am trying to encode the text but even before I send it, the percent sign is missing. //password_field is a UITextField holding the password: !@#$%^&*() NSString *tmpPass = [password_field.text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(p_field.text); NSLog(tmpPass); This is what appears in the console: !@#$^&*() [email protected]&*() Is there any reason why it would be dropping the percent sign?

    Read the article

  • How do I pass session variables from one domain to another in PHP

    - by Dave
    Hi everyone, I have encountered a situation where I need to pass $_SESSION variables from one domain to an iFrame page from another domain. I have spent the last 16 days trying various methods to no avail. I think that the only logical way would be to encode the variables in the url that calls the iFrame and decode them in th iFrame page. I am not sure how to go about this and I am looking for any samples, assistance etc that I can find. Thanks for any and all suggestions. Here is an example of what I am trying to do... Example: <!-- Note only using hidden as I didn't want to build the form at test phase--> <form name="test" method="post" action="iframe_test.php"> <input type="submit" name="Submit" /> <input type="hidden" name="fName" value="abc" /> <input type="hidden" name="lName" value="def" /> <input type="hidden" name="address1" value="ghi" /> <input type="hidden" name="address2" value="jkl" /> <input type="hidden" name="country" value="mno" /> <input type="hidden" name="postal_code" value="pqr" /> <input type="hidden" name="city" value="stu" /> <input type="hidden" name="retUrl" value="vwx"> <input type="hidden" name="decUrl" value="yz"> So from here I am hitting the iframe_test.php and doing the following: PHP Code: function StripSpecChar($val) { return (preg_replace('/[^a-zA-Z0-9" "-.@\:\/_]/','', $val)); } foreach ($_POST as $key => $val) { $_SESSION[$key] = StripSpecChar($val); } and I get a session array that looks like this: Code: Array ( [fName] => abc [lName] => def [address1] => ghi [address2] => jkl [country] => mno [postal_code] => pqr [city] => stu [retUrl] => vwx [decUrl] => yz ) Still all good so far....call the iFrame Code: <body> Some page stuff here <div align="center"><span class="style1"><strong>This is the iFrame Page</strong></span> </div> <div align="center"> <iframe src="https://www.other_domain.org/iframe/reserve.php" width="500" height="350" frameBorder="0"></iframe> </div> </body> So HOW do I take... $_SESSION['fName']['abc']; $_SESSION['lName']['def']; $_SESSION['address1']['ghi']; $_SESSION['address2']['jkl']; $_SESSION['country']['mno']; $_SESSION['postal_code']['pqr']; $_SESSION['city']['stu']; $_SESSION['retUrl']['vwx']; $_SESSION['decUrl']['yz']; and turn it into the encoded url that I am looking for? Further once that is done how to I get the session vars back as session vars on that new domain iFrame page...

    Read the article

  • Can backslash be encoded correctly in URL with URL rewrite?

    - by Millionbonus
    I am working on a ASP.NET MVC2 project. The problem is when a string which would be rewritten into URL that contains special character such as backslash or question mark. That will make URL wrong, even I have encoded it before. For example: 1. I have a product id "p001/2-2". 2. I encoded it into "p001%252f2-2" 3. The URL http://domain.com/ProductView/p001%252f2-2 will response HTTP Error 400 - Bad Request. How can I get it correct?

    Read the article

  • Python 3.1 twitter post with installed library,

    - by Andrew
    I'd like to be able to post twitter messages from python 3.0. None of the twitter API I have looked at support python 3.1. Since the post proceedure only requires this : JSON: curl -u username:password -d status="your message here" http://api.twitter.com/1/statuses/update.json I was wondering if it is possible with the standard libraries to format this so a message could be sent. My head says it should be possible.

    Read the article

  • Sending URL as a parameter using javascript

    - by Prashant Singh
    I have to send a name and a link from client side to the server. I thought of using AJAX called by Javascript to do this. This is what I mean. I wished to make an ajax request to a file called abc.php with parameters :- 1. http://thumbs2.ebaystatic.com/m/m7dFgOtLUUUSpktHRspjhXw/140.jpg 2. Apple iPod touch, 3rd generation, 32GB To begin with, I encoded the URL and tried to send it. But the server says status Forbidden Any solution to this ? UPDATE :: It end up calling to http://abc.com/addToWishlist.php?rand=506075547542422&image=http://thumbs1.ebaystatic.com/m/mO64jQrMqam2jde9aKiXC9A/140.jpg&prod=Flat%20USB%20Data%20Sync%20Charging%20Charger%20Cable%20Apple%20iPhone%204G%204S%20iPod%20Touch%20Nano Javascript Code :: function addToWishlist(num) { var myurl = "addToWishlist.php"; var myurl1 = myurl; myRand = parseInt(Math.random()*999999999999999); var rand = "?rand="+myRand ; var modurl = myurl1+ rand + "&image=" + encodeURI(storeArray[num][1]) + "&prod=" + encodeURI(storeArray[num][0]); httpq2.open("GET", modurl, true); httpq2.onreadystatechange = useHttpResponseq2; httpq2.send(null); } function useHttpResponseq2() { if (httpq2.readyState == 4) { if(httpq2.status == 200) { var mytext = httpq2.responseText; document.getElementById('wish' + num).innerHTML = "Added to your wishlist."; } } } Server Code <?php include('/home/ankit/public_html/connect_db.php'); $image = $_GET['image']; $prod = $_GET['prod']; $id = $_GET['id']; echo $prod; echo $image; ?> As I mentioned, its pretty basics More Updates : On trying to send a POST request via AJAX to the server, it says :- Refused to set unsafe header "Content-length" Refused to set unsafe header "Connection"

    Read the article

  • url encoded forward slashes breaking my codeigniter app

    - by Ian Cook
    i’m trying to create a url string that works like this: /app/process/example.com/index.html so in other words, /app/process/$URL i then retrieve the url with $this->uri->segment(3); the forward slashes in the URL will of course be a problem accessing uri segments, so i’ll go ahead and url encode the URL portion: /app/process/example.com%2Findex.html .. but now I just get a 404 saying ... Not Found The requested URL /app/process/example.com/index.html was not found on this server. it appears that my url encoding of forward slashes breaks CI’s URI parser. what can i do to get around this problem?

    Read the article

  • PHP URL parameters append return special character

    - by Alexandre Lavoie
    I'm programming a function to build an URL, here it is : public static function requestContent($p_lParameters) { $sParameters = "?key=TEST&format=json&jsoncallback=none"; foreach($p_lParameters as $sParameterName => $sParameterValue) { $sParameters .= "&$sParameterName=$sParameterValue"; } echo "<span style='font-size: 16px;'>URL : http://api.oodle.com/api/v2/listings" . $sParameters . "</span><br />"; $aXMLData = file_get_contents("http://api.oodle.com/api/v2/listings" . $sParameters); return json_decode($aXMLData,true); } And I am calling this function with this array list : print_r() result : Array ( [region] => canada [category] => housing/sale/home ) But this is very strange I get an unexpected character (note the special character none*®*ion) : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home For information I use this header : <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> <?php header('Content-Type: text/html;charset=UTF-8'); ?> EDIT : $sRequest = "http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none&region=canada&category=housing/sale/home"; echo "<span style='font-size: 16px;'>URL : " . $sRequest . "</span><br />"; return the exact URL with problem : http://api.oodle.com/api/v2/listings?key=TEST&format=json&jsoncallback=none®ion=canada&category=housing/sale/home Thank you for your help!

    Read the article

  • php $_REQUEST data is only half-decoded

    - by hackmaster.a
    I am retrieving a url via querystring. I need to pass it again to the next page. When I retrieve it the first time, using $_REQUEST['url'], only the slashes are decoded, e.g: http://example.com/search~S10?/Xllamas&searchscope=10&SORT=D/Xllamas&searchscope=10&SORT=D&SUBKEY=llamas/51%2C64%2C64%2CB/browse The php docs page for urldecode advises against decoding request data, and says that it will already be decoded. I need it either completely decoded, so I can encode it again without double-encoding some parts, or not decoded at all. I'm not sure why my experience of this data is incongruous with the php docs. Appreciate any help or pointers to same!!

    Read the article

  • PHP String Encoding Error

    - by Brian
    I'm trying to get the following code to output an IMG tag with the URL for Google Static Maps API http://code.google.com/apis/maps/documentation/staticmaps/#Imagesizes embedded in there... the result is that everything except the $address is being output successfully... what am I doing wrong? function event_map_img($echo = true){ global $post; $address = get_post_meta($post->ID, 'date_address', true); if($echo): echo '<img src="'.'http://maps.google.com/maps/api/staticmap?center='.$address.'&zoom=14&size=700x512&maptype=roadmap&markers=color:blue|label:X|'.$address.'&sensor=false" />'; else: return '<img src="'.'http://maps.google.com/maps/api/staticmap?center='.$address.'&zoom=14&size=700x512&maptype=roadmap&markers=color:blue|label:X|'.$address.'&sensor=false" />'; endif; }

    Read the article

  • Unicode and URI encoding, decoding and escaping in JavaScript

    - by apphacker
    If you look at this table here, it has a list of escape sequences for Unicode characters that don't actually work for me. For example for "%96", which should be a –, I get an error when trying decode: decodeURIComponent("%96"); URIError: URI malformed If I attempt to encode "–" I actually get: encodeURIComponent("–"); "%E2%80%93" I searched through the internet and I saw this page, which mentions using escape and unescape with decodeURIComponent and encodeURIComponent respectively. This doesn't seem to help because %96 doesn't show up as "–" no matter what I try and this of course wouldn't work: decodeURIComponent(escape("%96)); "%96" Not very helpful. How can I get "%96" to be a "–" with JavaScript (without hardcoding a map for every single possible unicode character I may run into)?

    Read the article

  • Form string data url encoded by some browsers .net

    - by nLL
    Hi, i came accross with a peculiar issue on my mobile site. some phones/gateways sends form post data as url encoded and a text such as "hey how are you?" in a form with method post stored in the db as "hey+how+are+you%3f" This is not the issue with many browsers but one single network from USA called Metro. I notice different phone models acting same way so i assue this is an issue with proxy/gateway. would simply putting _msg = HttpUtility.UrlDecode(_msg); solve my problem? any other suggestions? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >