francky's DevelopersCorner.nl tips & trics (home)
Small tool for quick replacement of all spaces in a link-code by the 'unbreakable' URL-code %20, and all & signs by the valid html-notation &
I made a webpage which was passing the html-validator perfectly. Three months later I was checking
again, coincidentally. What? A bunch of errors! But I just added some new links, carefully copied from the
address bar of the browser.
The culprit? The "ampersand", the & sign,
which has to be a & for valid URL-encoding
In the names of maps or files in a site, empty spaces can bring on a broken link (and pages vanishing into space, or untraceable documents; especially in e-mails), which can be avoided by the use of the %20 code.
With this small tool you'll get rid of both inadequacies.
Paste your link-code here:
Your corrected URL-code is here:
Copy this code, and paste it in your html-editor.
In pages of Google Maps a mini menu 'Link'
is visible; in a pop-up the options are
given: 'Paste link in e-mail or chat message'
and 'paste HTML in website'
.
The second option has the intention to put a Google Map directly in a box in a html page, by means of an <iframe>. Unfortunately, when you are using the recommended Strict DOCtype, this is delivering invalid html as well. To embed a Google Map in this way, a Transitional DOCtype is needed.
In your own site, you should never use a & sign in a directory name or file name, and never use a space in a directory name or file name!
francky,
july 2010