Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: URL white space issues

by sierpinski (Hermit)
on Sep 28, 2012 at 14:32 UTC ( #996234=note: print w/ replies, xml ) Need Help??


in reply to URL white space issues

"I have a problem with some links getting white spaces automatically"

How does the "automatically" part occur? The whitespace fairy doesn't pay you a visit... so when are these whitespaces being introduced? Usually that occurs when a file has a space in the filename, and a browser intelligently converts that space to a %20 to avoid a global meltdown. I think rather than converting the spaces, you should avoid them in the first place by fixing the source filenames (or what creates them if it's another process.)

In other words, If you have a file called "sample file.html", and you want to access it via a browser, you will have to use "http://yourserver.com/sample%20file.html" to reference it. Instead of trying to fix the URL, remove the space in the file name, perhaps "sample_file.html", so your URL will not have any %20 characters present. Would that solve your problem?


Comment on Re: URL white space issues
Re^2: URL white space issues
by Anonymous Monk on Sep 28, 2012 at 17:07 UTC
    Yes ... the whitespace fairy is a BUG coming from somewhere, and you need to trace that BUG to its true source, not just regex your way past the surface symptom.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996234]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-07-12 14:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (240 votes), past polls