Merge "Allow data URLs for toolbar icons"

This commit is contained in:
jenkins-bot 2019-09-08 11:54:45 +00:00 committed by Gerrit Code Review
commit c36ba4893e

View file

@ -196,6 +196,12 @@
key = fallbackChain[ i ];
if ( icon && hasOwn.call( icon, key ) ) {
src = icon[ key ];
// Return a data URL immediately
if ( src.substr( 0, 5 ) === 'data:' ) {
return src;
}
// Prepend path if src is not absolute
if ( src.substr( 0, 7 ) !== 'http://' && src.substr( 0, 8 ) !== 'https://' && src[ 0 ] !== '/' ) {
src = path + src;