support data-url format
fixed data-url bugs and added tests, closes #14