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

Swap quotation marks to be compatible with Kibana #2942

Merged
merged 5 commits into from
Aug 26, 2022

Conversation

nickchomey
Copy link
Contributor

Description of the Change

When the highlight tags get, presumably, converted into JSON, it results in a double set of double quotation marks, such as this
{"pre_tags":["<mark class="ep-highlight">"],

This PR changes it so that it generates single quotes wrapped in double quotes
{"pre_tags":["<mark class='ep-highlight'>"],

image

image

Closes #

How to test the Change

Generate a query that uses highlighting. Copy it into Kibana and try to run it.

Changelog Entry

Fixed - Bug fix - Quotation mark JSON formatting fix

Credits

Props @nickchomey

Checklist:

  • [ x] I agree to follow this project's Code of Conduct.
  • [ x] I have updated the documentation accordingly.
  • [ x] I have added tests to cover my change.
  • [ x] All new and existing tests pass.

When the highlight tags get, presumably, converted into JSON, it results in a double set of double quotation marks, such as this
{"pre_tags":["<mark class="ep-highlight">"],

This PR changes it so that it generates single quotes wrapped in double quotes
{"pre_tags":["<mark class='ep-highlight'>"],
@felipeelia felipeelia added this to the 4.3.0 milestone Aug 23, 2022
burhandodhy
burhandodhy previously approved these changes Aug 25, 2022
Copy link
Contributor

@burhandodhy burhandodhy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felipeelia
Copy link
Member

Hey @nickchomey, can you please address the problems found by the linter? Also, where are you copying that query from? Thanks!

@nickchomey
Copy link
Contributor Author

nickchomey commented Aug 25, 2022

@felipeelia I believe I've addressed the issue - it was silly of me to change more quotation marks than was necessary. However, one of the tests seems to have failed on many different things - all of which seem completely irrelevant to this PR... Is there perhaps something broken with the test mechanism?

And I believe I was copying the query from either the Debug Bar tool or directly from the code via Xdebug step debugging - they should be the same thing. The query wasn't working so I wanted to test and debug it from Kibana, which then provided more details about the issue of the quotation marks (though I'd imagine that the response shown by the Debug Bar tool contains the same info).

@felipeelia felipeelia merged commit ee38ce8 into 10up:develop Aug 26, 2022
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.

4 participants