From 0ee8130667035c5211206c018d1f1b17b2f74b63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 4 Jan 2022 11:50:50 +0100 Subject: [PATCH] Encode the double quote (`"`) in StringUtil::encodeJS() `encodeJSON()` is currently broken, because while it HTML-encodes the double quote, it does not actually add the backslash in front of it. Depending on whether the HTML entity is interpreted by the browser in that specific location or not, this either results in an incorrect string (with a literal `"` instead of `"`) or in a syntax error (because the `"` ends the string prematurely). The latter might even allow for the injection of JavaScript, if `encodeJSON` is used in a `