hakimel / reveal.js

The HTML Presentation Framework
https://revealjs.com
MIT License
67.9k stars 16.65k forks source link

Background image with base 64 encoded data URIs that embed newlines does not work any more (since 4.1.1) #3213

Open lechten opened 2 years ago

lechten commented 2 years ago

Hi there, with reveal.js up to 4.1.0, one could use background images encoded as data URIs. With 4.1.1, this stopped working. Now, the data URI is broken into two URLs, which does not work: url("data:image/jpg;base64"), url("/9j/4A...")

lechten commented 2 years ago

Actually, I do not observe two URLs any more with reveal.js 4.3.1 and master, but just an empty div.slide-background-content.

andersjohansson commented 2 years ago

For me, the problem seemed to only apply when there was line-breaks in the data-uri. Hence this change to org-re-reveal for generating data-uris without line breaks: https://gitlab.com/oer/org-re-reveal/-/merge_requests/35

lechten commented 2 years ago

Indeed, many thanks, @andersjohansson! This is a workaround for org-re-reveal.

I updated the title of this issue to reflect newlines as major cause.