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

Re: URL white space issues

by sierpinski (Chaplain)
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 "" 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996234]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2018-06-20 10:37 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.