Merge pull request #1768 from demoneaux/background-images

Allow background images without protocols to have query hashes/parameters.
This commit is contained in:
Hakim El Hattab 2017-01-23 11:11:28 +01:00 committed by GitHub
commit cb16f27dd3
1 changed files with 1 additions and 1 deletions

View File

@ -859,7 +859,7 @@
if( data.background ) {
// Auto-wrap image urls in url(...)
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) {
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test( data.background ) ) {
slide.setAttribute( 'data-background-image', data.background );
}
else {