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

Debug->debugSQL() Strips Tags #1354

Closed
bhsmither opened this issue Nov 15, 2016 · 3 comments
Closed

Debug->debugSQL() Strips Tags #1354

bhsmither opened this issue Nov 15, 2016 · 3 comments

Comments

@bhsmither
Copy link
Contributor

Near line 198, the $message is first given to PHP's strip_tags() function. Suggest relying only on PHP's htmlentities() function.

Same for near line 243 in the display() function.

See #657.

This was found when examining the debug section looking for a query created in dashboard.index.inc.php, near line 290, where the character sequence <= causes the remainder of the displayed query to be truncated.

@abrookbanks
Copy link
Member

There was good reason for strip tags when this was coded. We don't want to see HTML tags in the debug output.

@bhsmither
Copy link
Contributor Author

bhsmither commented Nov 21, 2016

What we don't want is for the browser to act on what are real HTML tags. The htmlentities() takes care of that - replacing the tag <script> with the string &lt;script&gt; which displays as <script>, and the string A<=B or C>D with A&lt;=B or C&gt;D which would otherwise show as AD.

The strip_tags() is not discriminating.

@abrookbanks
Copy link
Member

I think the issue was with PHP errors. They are ready with HTML which isn't necessary.

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

No branches or pull requests

2 participants