DEV: Remove HTML setting type and sanitization logic. (#14440)

* DEV: Remove HTML setting type and sanitization logic.

We concluded that we don't want settings to contain HTML, so I'm removing the setting type and sanitization logic. Additionally, we no longer allow the global-notice text to contain HTML.

I searched for usages of this setting type in the `all-the-plugins` repo and found none, so I haven't added a migration for existing settings.

* Mark Global notices containing links as HTML Safe.
This commit is contained in:
Roman Rizzi
2021-10-04 15:40:35 -03:00
committed by GitHub
parent 9f626f2735
commit 90a3fbc07b
10 changed files with 24 additions and 56 deletions

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class MigrateDeprecatedHtmlSettingType < ActiveRecord::Migration[6.1]
def up
execute <<~SQL
UPDATE site_settings
SET data_type = 1
WHERE data_type = 25
SQL
end
def down
raise ActiveRecord::IrreversibleMigration
end
end