mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FEATURE: update bootstrap mode notice to add invite and wizard links (#17822)
* FEATURE: update bootstrap mode notice to add invite and wizard links * Updates per feedback on PR * Fix the wizard link not showing * Remove unneeded function * Remove router service injection
This commit is contained in:
@ -114,13 +114,13 @@ RSpec.describe TranslationOverride do
|
||||
end
|
||||
|
||||
it 'sanitizes values before upsert' do
|
||||
xss = "<a href='%{url}' data-auto-route='true'>setup wizard</a> ✨<script>alert('TEST');</script>"
|
||||
xss = "<a target='blank' href='%{path}'>Click here</a> <script>alert('TEST');</script>"
|
||||
|
||||
TranslationOverride.upsert!('en', 'js.wizard_required', xss)
|
||||
TranslationOverride.upsert!('en', 'js.themes.error_caused_by', xss)
|
||||
|
||||
ovr = TranslationOverride.where(locale: 'en', translation_key: 'js.wizard_required').first
|
||||
ovr = TranslationOverride.where(locale: 'en', translation_key: 'js.themes.error_caused_by').first
|
||||
expect(ovr).to be_present
|
||||
expect(ovr.value).to eq("<a href=\"%{url}\" data-auto-route=\"true\">setup wizard</a> ✨alert('TEST');")
|
||||
expect(ovr.value).to eq("<a href=\"%{path}\">Click here</a> alert('TEST');")
|
||||
end
|
||||
|
||||
it "stores js for a message format key" do
|
||||
|
Reference in New Issue
Block a user