사용자 필드에 감시 단어 링크가 있으면 HTML 링크로 변경되어(그리고 보기 흉하게 됩니다)

When a user puts a watched word into a user field, strange things happen.

This is an example using the User Field Employer(s), and having Te Whatu Ora as a watched word link.

Baseline:


Changed field to Te Whatu Ora:

It also changed the field itself:

Suggestion

That watched-words-links are modified so that they do not apply to user_fields.

Not sure about other watched words (didn’t test them).

4개의 좋아요

hey @nathank – 당신의 게시물을 정말 좋아해요. 항상 발견하신 내용에 대해 자세한 정보를 잘 공유해 주시죠!

저도 이렇게 하면 비슷한 현상을 볼 수 있어요. 'cow goes boo’를 감시 단어 링크(watched-word-link)로 설정했는데, 사용자 필드에 추가하면 전체 링크가 표시되더라고요. 다만 제 경우에는 감시 단어의 첫 글자도 함께 표시됩니다. 당신도 그런 현상을 보고 계신가요? 링크를 변경하고, 링크 목록에서 삭제했다가 다시 추가해 보았는데도 여전히 링크 앞에 'c’가 표시되고 있어요:


3개의 좋아요

@nbianca recently improved the implementation per:

https://github.com/discourse/discourse/pull/17590

Are you running latest?

1개의 좋아요

I can replicate this second issue (version: af912b4b0e):

  • Add eg ‘Meta’ to /admin/customize/watched_words/action/link with a link of https://meta.discourse.org/
  • Create Custom User Field (editable)
  • Insert ‘Meta’ into a user’s Custom Field and save
  • Refresh page
  • ‘Meta’ has been replaced with ‘Mhttps://meta.discourse.org/’

4개의 좋아요

Yes, running latest (updated after that merge). Seemed to be a new bug to me - maybe related to that code change?

1개의 좋아요

@loic any chances you can have a look at this one?

1개의 좋아요

I’ll have a look :+1:

1개의 좋아요

I can’t reproduce locally. I think this bug has been fixed by this PR which has been merged yesterday:
https://github.com/discourse/discourse/pull/17445

5개의 좋아요

Are we good to close this? We have no repro, are you on latest @nathank and able to repro?

2개의 좋아요

@nathank assuming this is fixed now, flag to reopen if still an issue.

1개의 좋아요

Apologies Sam, has been a busy couple of weeks.

I’m afraid that the issue remains. To reproduce it you need the user field set to :ballot_box_with_check: Show on public profile?. I was able to do this on a nearly vanilla site as well as my busy / laden with plugins normal site.

It occurs regardless of the case-sensitivity setting, and for Replace as well as Link (and probably the others, but I didn’t test them).

1개의 좋아요

I just noticed watched words > links also work on custom fields.

e.g.
discourse = https://meta.discourse.com

Custom profile field X has value: discourse > it will show the link in the profile field.

I do not think this is expected behavior.

3개의 좋아요

Hi @MarcP
I am testing this on the latest discourse branch test-passed but I am unable to reproduce the issue. Can you share which discourse version are you using?

Before reporting this, I ran a rebuild, so I am on: 2.9.0.beta13 (0cb6d8c8fc).

I noticed this in a user custom field. Whenever I edit the field, and click save, it returns the URL value I specified for the word.

1개의 좋아요

Yes, I am able to reproduce this issue.

Reproducing Steps:

  1. Visit AdminCustomizeWatched WordsLink
  2. Create a watched word link
  3. Visit AdminCustomizeUser Fields
  4. Create a custom field with field type: Text Field
  5. Navigate User ProfilePreferencesProfile
  6. Enter the watched word created in point 2.
  7. Save the preferences.
  8. Reload the page and you will find the watched word replaced with the URL specified in point 2.

here’s the screen recording:

3개의 좋아요

Perfect.

Also notice “Test Custom Field” should have the same header styling as “Web Site”, am I right? The same UI bug is visible on my instance.

1개의 좋아요

I think this has been previously mentioned here When a watched-word-link is in a user field, it is changed to the HTML link (and it looks terrible) as well

@MarcP Nathan has confirmed this is the same issue and has merged your topics for easier tracking. :+1:

8개의 좋아요

Just noticed, that this issue is still a thing.

1개의 좋아요