Skip to content

Commit

Permalink
Allow background images without protocols to have query hashes/parame…
Browse files Browse the repository at this point in the history
…ters.

Closes hakimel#1603.
  • Loading branch information
bnjmnt4n committed Dec 11, 2016
1 parent 90b301d commit 441a26c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 441a26c

Please sign in to comment.