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

Search query display error html tags #847

Closed
mathiconical opened this issue Aug 1, 2024 · 0 comments
Closed

Search query display error html tags #847

mathiconical opened this issue Aug 1, 2024 · 0 comments
Assignees
Labels
bug 🪲 Something isn't working

Comments

@mathiconical
Copy link

mathiconical commented Aug 1, 2024

Describe the bug
When I search the query on ModalHistory component appears a html tags with my input text.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'History'.
  2. Click on 'Input Text'.
  3. Search a existent query.
  4. See the error.

Expected behavior
Expected to see the search text in different color, specific text-primary text-bold.

Screenshots
image

On this image, the sql-highlight overlaid the color of search text (text-primary text-bold).
image

Application (please complete the following information):

  • App client [e.g. MariaDB]
  • App version [e.g. 0.7.27]
  • Installation source: [e.g. exe, Linux Store, AppImage, dmg]

Environment (please complete the following information):

  • OS name: [e.g Lubuntu]
  • OS version [e.g. 22.04 LTS]
  • DB name [e.g. MariaDB]
  • DB version [e.g. 10.3.34]

Additional context
To disable this, on ModalHistory.vue, remove the function hightlightWord:

v-html="highlight(highlightWord(query.sql), {html: true})"
v-html="highlight(query.sql, {html: true})"

Or, if you still want a visual effect, can be replace the pattern of highlightWord function:

return string.replace(regexp, '$1');
return string.replace(regexp, '%$1%'); // replace the % to quotation marks.

This will display the pattern of string green color.
image
image

@Fabio286 Fabio286 added the bug 🪲 Something isn't working label Aug 2, 2024
@Fabio286 Fabio286 moved this from 📌 To do to ⏳ In progress in Work in Progress Board Aug 5, 2024
@Fabio286 Fabio286 moved this from ⏳ In progress to ✔ Done in Work in Progress Board Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants