Open
Description
I have the following snippet:
connectPlot :: (DomBuilder t m, Prerender t m) => String -> m ()
connectPlot svg = do
prerender_ blank $ do
postBuild <- getPostBuild
logEvent (svg <$ postBuild)
elAttr "div" ("style" =: "width: 100%; height: 100%;") $
elAttr "img" ("src" =: T.pack svg <> "style" =: "width: 100%; height: auto;") blank
When running with `ob run`, the image renders correctly.
However, when compiled, the <img> element only displays the first character of the src, which is "d"
(from the Base64 URI starting with "data:image/svg+xml;base64,...").
The `logEvent` function logs the full value to the browser console correctly, for example:
data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2Zy...
But the rendered output in the browser becomes:
<img src="d" ...>
Any ideas on what’s causing this issue in the compiled version (nix-build -A exe)?
Metadata
Metadata
Assignees
Labels
No labels