I put some social network button on site. The Html Validator always tell me some URL is not correct.
Ok.
I have to code it my self to replace the original code.
Original code is as shown below:

<!-- del.icio.us -->
 <a href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;title=<?php the_title ?>" title="Add to del.icio.us">Del.icio.us</a>
 <!-- /del.icio.us -->

I change it to:

<?php
$title = wp_title('',FALSE);
$tt = urlencode($title);
$tt = substr($tt,2);
?>
<!-- del.icio.us -->
<a href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;amp;title=<?php echo $tt; ?>" title="Add to del.icio.us">Del.icio.us</a>
<!-- /del.icio.us -->

Now the link is perfect, without warning from HTML Validator.
Perfect code.

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *