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 authored and Tobias committed Feb 22, 2018
1 parent 4c3f545 commit 422224c
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 422224c

Please sign in to comment.