Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: searchable belongs_to field keep html tags on selected option #2423

Merged

Conversation

Paul-Bob
Copy link
Contributor

Description

Fixes #2416

Clear all HTML tags before updating the belongs_to searchable field with selected option.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Before

before

After

after

@Paul-Bob Paul-Bob added the Fix label Jan 29, 2024
@Paul-Bob Paul-Bob self-assigned this Jan 29, 2024
Copy link

codeclimate bot commented Jan 29, 2024

Code Climate has analyzed commit 95e6e5d and detected 0 issues on this pull request.

View more on Code Climate.

@adrianthedev
Copy link
Collaborator

What if the user wants to show some HTML on those entries?

@Paul-Bob
Copy link
Contributor Author

What if the user wants to show some HTML on those entries?

Should we keep HTML attributes and applying them on the entry?

Or specifically target to remove only <mark> and </mark> ?

Maybe someone want to keep even the marked version.

My idea to KSS was to remove all HTML marks and get back to it if someone present a real use case

@Paul-Bob Paul-Bob merged commit 3899519 into main Jan 29, 2024
22 of 23 checks passed
@Paul-Bob Paul-Bob deleted the fix/belongs_to_searchable_html_tags_on_selected_option branch January 29, 2024 14:27
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<mark> tag persists when selecting on a belongs association with searchable true
2 participants