Make sure that you are encoding that url parameter correctly. Here is an example of the code in php:
<a class="DiggThisButton DiggIcon" href="http://digg.com/submit?url=<?php echo urlencode('http://localhost/test/untitled2.php?test=3'); ?>"></a>
you can see that the url is being url encoded.
If you are still having an issue please post back with the code that you are using.