-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Debug] Improve keyword highlighting and escaping of query strings. #5200
[Debug] Improve keyword highlighting and escaping of query strings. #5200
Conversation
Added a first basic test. CodeIgniter4/system/Database/Query.php Lines 406 to 408 in 9c6a355
is trying to achieve? compileBinds does:CodeIgniter4/system/Database/Query.php Line 276 in 9c6a355
So if finalQueryString was empty before, it will also be empty after, or do I miss something?
I think, |
That part I added for the sake of prudence. Essentially that is useless because before calling getDebugToolbarDisplay() on Query we are sure that compileBinds was already called when the sql was executed. Added there only as guard. I think with the proposed changes in #5127 we'll get a different approach on how to treat these things. |
Alright, did not see that #5127 already handles this. I will leave it like it is then.
|
Add HTML escaping, please. |
Added |
How about using |
Seems to work in principle, too. Possible workaround would be to change the regex from looking for |
The escaping way looks good to me. |
The |
Use |
Should be working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome! I haven't read all the code but seeing as the others have: I approve the screenshot. 🤣
Whoever merges please squash.
Description
This PR adds a few more composite query keywords to the highlight list for the debug toolbar.I also decided to sort the keywords alphabetically, as it was a pain checking which ones are missing. (This is debatable of course.)''
).Depends on #5196.
Checklist:
Before:
After: