This bit is great:<p><pre><code> box = box.replace(/#/g, function() {
i++
if (str[i]) {
return str[i]
} else {
return "";
}
});
</code></pre>
It would be cool if you could select which characters (or all characters except for space) will be replaced with the data URI.