don't add base-path to data-uris. closes #258

This commit is contained in:
Alexis Sellier
2011-05-11 09:30:44 -04:00
parent 3823404878
commit 37ee7eb8d5

View File

@@ -5,7 +5,7 @@ tree.URL = function (val, paths) {
this.attrs = val;
} else {
// Add the base path if the URL is relative and we are in the browser
if (!/^(?:https?:\/|file:\/)?\//.test(val.value) && paths.length > 0 && typeof(window) !== 'undefined') {
if (!/^(?:https?:\/|file:\/|data:\/)?\//.test(val.value) && paths.length > 0 && typeof(window) !== 'undefined') {
val.value = paths[0] + (val.value.charAt(0) === '/' ? val.value.slice(1) : val.value);
}
this.value = val;