Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: URL white space issues

by sierpinski (Chaplain)
on Sep 28, 2012 at 14:32 UTC ( [id://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?

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://996234]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-03-19 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found