From 58bc4b693415079127dd11d8210d2564a443010d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 20 Jan 2022 11:48:16 +0100 Subject: [PATCH] Add `|json` template modifier (cherry picked from commit e178fa84dc06861c5aba3d14e03161c5396fe9a7) --- .../JsonModifierTemplatePlugin.class.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/template/plugin/JsonModifierTemplatePlugin.class.php diff --git a/wcfsetup/install/files/lib/system/template/plugin/JsonModifierTemplatePlugin.class.php b/wcfsetup/install/files/lib/system/template/plugin/JsonModifierTemplatePlugin.class.php new file mode 100644 index 0000000000..16e3652dca --- /dev/null +++ b/wcfsetup/install/files/lib/system/template/plugin/JsonModifierTemplatePlugin.class.php @@ -0,0 +1,34 @@ +getTitle()|json} } + * + * Depending on the location you might need to either HTML-encode the resulting JSON string + * or not. Within a `