From 90ac58045afd2899fc40d6ce2faa2e1831455e51 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 15 Aug 2017 14:48:41 +0200 Subject: [PATCH] Force disable of HTML bbcode by default --- .../UserGroupOptionPackageInstallationPlugin.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wcfsetup/install/files/lib/system/package/plugin/UserGroupOptionPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/UserGroupOptionPackageInstallationPlugin.class.php index 05b52721ab..b8d44de063 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/UserGroupOptionPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/UserGroupOptionPackageInstallationPlugin.class.php @@ -57,6 +57,14 @@ class UserGroupOptionPackageInstallationPlugin extends AbstractOptionPackageInst if (isset($option['options'])) $options = StringUtil::normalizeCsv($option['options']); if (isset($option['usersonly'])) $usersOnly = $option['usersonly']; + // force the `html` bbcode to be disabled by default + if ($optionType === 'BBCodeSelect') { + $defaultValue .= (empty($defaultValue) ? '' : ',') . 'html'; + $adminDefaultValue .= (empty($adminDefaultValue) ? '' : ',') . 'html'; + $modDefaultValue .= (empty($modDefaultValue) ? '' : ',') . 'html'; + $userDefaultValue .= (empty($userDefaultValue) ? '' : ',') . 'html'; + } + // collect additional tags and their values $additionalData = []; foreach ($option as $tag => $value) { -- 2.20.1