From: Ian Jackson Date: Fri, 15 Apr 2022 17:54:07 +0000 (+0100) Subject: Special client rendering: Fix quoting of JSON payload X-Git-Tag: otter-1.1.0~580 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=599ee88f1bbd314a3672a8cb4d2a65bff2bce191;p=otter.git Special client rendering: Fix quoting of JSON payload The needs to be in " " (and the JS will evaluate it). Signed-off-by: Ian Jackson --- diff --git a/src/pcrender.rs b/src/pcrender.rs index 5315d07b..e84f8166 100644 --- a/src/pcrender.rs +++ b/src/pcrender.rs @@ -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,