diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 5ec9b8f8870..f6e15b2e8a2 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -156,6 +156,7 @@ class Odf */ public function convertVarToOdf($value, $encode = true, $charset = 'ISO-8859') { + $value = $encode ? htmlspecialchars($value) : $value; $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; $convertedValue = $value;