mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
UX: Skip applying link-type watched words to user custom fields (#20465)
We currently apply type: :link watched words to custom user fields. This makes the user card pretty ugly because we don't allow html / links there. Additionally, the admin UI also does not say that we apply this to custom user fields, but only words in posts. So this PR is to remove the replacement of link-type watch words for custom user fields.
This commit is contained in:
@ -362,6 +362,23 @@ RSpec.describe User do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when watched words are of type 'link'" do
|
||||
let(:value) { "don't replace me" }
|
||||
let!(:replace_word) do
|
||||
Fabricate(
|
||||
:watched_word,
|
||||
word: "replace",
|
||||
replacement: "touch",
|
||||
action: WatchedWord.actions[:link],
|
||||
)
|
||||
end
|
||||
|
||||
it "does not replace anything" do
|
||||
user.save!
|
||||
expect(user_field_value).to eq value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when user fields do not contain watched words" do
|
||||
|
Reference in New Issue
Block a user