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

Refactor Search Term Display into a Reusable Component #107

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

lucianghinda
Copy link
Member

@lucianghinda lucianghinda commented Sep 7, 2023

What

This commit refactors the display of the search term into a reusable component, SearchTermComponent.

Why

This component is now used across various views (authors, books, courses, newsletters, podcasts, screencasts, tags, youtubes) to display the search term, improving code reusability and maintainability.

The search term is also properly escaped to prevent potential Cross-Site Scripting (XSS) attacks. System tests for course search functionality have been updated accordingly.

How

I replaced the direct HTML in the views with a call to render the SearchTermComponent

PR checklist

  • This Pull Request is related to a single change. Unrelated changes should be opened in separate PRs.
  • Commit messages have a detailed description of what changed and why.
  • Tests are added or updated if you fix a bug or add a feature
  • PR has a description that includes what, why and how

This commit refactors the display of the search term into a reusable component, SearchTermComponent. This component is now used across various views (authors, books, courses, newsletters, podcasts, screencasts, tags, youtubes) to display the search term, improving code reusability and maintainability.

The search term is also properly escaped to prevent potential Cross-Site Scripting (XSS) attacks. System tests for course search functionality have been updated accordingly.
@lucianghinda lucianghinda self-assigned this Sep 7, 2023
@lucianghinda lucianghinda merged commit 9b26dbf into main Sep 7, 2023
4 checks passed
@lucianghinda lucianghinda deleted the lg/escape-search-param branch September 7, 2023 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant