Suppress the HTML encoding of values encoded by `|encodeJS`
authorAlexander Ebert <ebert@woltlab.com>
Mon, 6 Mar 2023 13:08:55 +0000 (14:08 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 6 Mar 2023 13:08:55 +0000 (14:08 +0100)
This causes entities to be encoded, but the implementation expects them to be plain text.

See https://www.woltlab.com/community/thread/298737-sonderzeichen-in-umfragen/

com.woltlab.wcf/templates/__messageFormPoll.tpl
com.woltlab.wcf/templates/__messageFormPollInline.tpl

index 89d12aad145697424fe1b2f958de57a9a93d5c6a..90ab2e4d7ff98efbfe34a506e6517b460c79df11 100644 (file)
@@ -8,7 +8,7 @@
 
                        new UiPollEditor(
                                'pollOptionContainer',
-                               [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
+                               [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{@$pollOption[optionValue]|encodeJS}' }{/implode} ],
                                "",
                                {
                                        maxOptions: {@POLL_MAX_OPTIONS}
index 20c654c789c3d0da8784c33966b9ff2b54920f0b..d92bbcb0d1bbcb10cb38a381ca0d11e5ce5c8e9b 100644 (file)
@@ -10,7 +10,7 @@
                        
                        new WCF.Poll.Management(
                                'pollOptionContainer_{$wysiwygSelector}',
-                               [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{$pollOption[optionValue]|encodeJS}' }{/implode} ],
+                               [ {implode from=$pollOptions item=pollOption}{ optionID: {@$pollOption[optionID]}, optionValue: '{@$pollOption[optionValue]|encodeJS}' }{/implode} ],
                                {@POLL_MAX_OPTIONS},
                                '{$wysiwygSelector}'
                        );