One of the reasons why a webpage might not pass the W3C markup validation test is unencoded ampersands in the link URLs. This can often happen with links provided by affiliate schemes. You copy and paste the link code into your valid (X)HTML page and, lo and behold, the page no longer validates. Well, Dreamweaver can help.
We have been attempting to improve several websites so that they pass the W3C test and this ‘problem’ caused us to think twice. It can be quite a chore to go back through a website and edit the URLs so that “&” is changed to its encoded version†
However, if you use Dreamweaver 8 and paste the URL into the Properties panel, DW will convert the unencoded characters in the URL for you if your web page has the correct XHTML doctype.
In our limited testing, this does not work with DW8 and HTML 4 doctypes.
By doing this, Dreamweaver 8 converts any unencoded ampersands in a URL into the encoded characters. Great!
Note added: Dreamweaver’s code rewriting functions can be changed in Edit – Preferences – Code Rewriting
Using Dreamweaver’s find and replace function is another way of replacing “&” by the encoded version.
† The encoded version (aka HTML character entity) is & followed by a semi-colon. It’s required in this format in order to be valid markup. See this article for more details.
Join SugarSync for online backup. Sync your files between Mac, PC and mobile phone. Get 2 GB FREE and up to 10 GB bonus space!
Flexible Web Design by Zoe Mickley Gillenwater describes how to build fluid and elastic CSS layouts. It's a great read!
Buy from Amazon.com · Amazon.co.uk