Window Open from jquery click
<p>How can I make this more secure and safe:</p>

<ul>
<li>Strip unsafe characters from title</li>
<li>Prevent undefined errors</li>
</ul>

<p>Code so far:</p>

<pre><code>// Open HREF in popup window
$('.external').bind('click', function () {
    var url = $(this).attr("href");
    var title = ($(this).attr("data-popup-title")) ? $(this).attr("data-popup-title") : $(this).attr("title");
    var image = $(this).attr("data-popup-image");
    var width = ($(this).attr("data-popup-width")) ? $(this).attr("data-popup-width") : '626';
    var height = ($(this).attr("data-popup-height")) ? $(this).attr("data-popup-height") : '436';
    window.open('http://www.facebook.com/sharer.php?s=100&amp;amp;p[title]=' + title + '&amp;amp;p[url]=' + url + '&amp;amp;&amp;p[images][0]=' + image, 'sharer', 'toolbar=0,status=0,width='+width+',height='+height);
    return false;
});
</code></pre>

<p>Also is it best practice to <code>return false</code> or use the <code>preventDefault()</code>?</p>
