From: Matthias Schmidt Date: Tue, 16 Oct 2018 17:39:05 +0000 (+0200) Subject: Fix encoding issue in bbcode PIP when writing via GUI X-Git-Tag: 5.2.0_Alpha_1~620 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c2c3a0e6080ed58e38c4c708e07d061cbfca6b6c;p=GitHub%2FWoltLab%2FWCF.git Fix encoding issue in bbcode PIP when writing via GUI See #2545 --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php index 7813ddbbb5..43b3644b18 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php @@ -504,8 +504,14 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug $bbcode, [ 'classname' => '', - 'htmlclose' => '', - 'htmlopen' => '', + 'htmlclose' => [ + 'cdata' => true, + 'defaultValue' => '' + ], + 'htmlopen' => [ + 'cdata' => true, + 'defaultValue' => '' + ], 'isBlockElement' => 0, 'sourcecode' => 0, 'buttonlabel' => '', @@ -523,7 +529,9 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug $attribute->setAttribute('name', (string) $attributeNumber); if (!empty($attributeData['attributeHtml'])) { - $attribute->appendChild($document->createElement('html', $attributeData['attributeHtml'])); + $html = $document->createElement('html'); + $html->appendChild($document->createCDATASection($attributeData['attributeHtml'])); + $attribute->appendChild($html); } if (!empty($attributeData['validationPattern'])) { $attribute->appendChild($document->createElement('validationpattern', $attributeData['validationPattern']));