chiark / gitweb /
Special client rendering: Fix quoting of JSON payload
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 17:54:07 +0000 (18:54 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 15 Apr 2022 19:39:28 +0000 (20:39 +0100)
The needs to be in " " (and the JS will evaluate it).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/pcrender.rs

index 5315d07b026c4e9404e489f04484c598dc836bab..e84f816685f8345413ac18122a4ca4328da62e06 100644 (file)
@@ -209,7 +209,7 @@ impl PieceRenderInstructions {
     if let Some(special) = &special {
       let special = serde_json::to_string(&special).map_err(IE::JSONEncode)?;
       hwrite!(&mut defs,
-              r##" data-special={}"##,
+              r##" data-special="{}""##,
               Html::from_txt(&special))?;
     }
     hwrite!(&mut defs,