Bug #76393 [NEW]: serving comments
| From: | andrew at grillet dot co dot uk | Date: | Wed, 30 May 2018 09:37:10 +0000 |
| Subject: | Bug #76393 [NEW]: serving comments | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-215422@lists.php.net to get a copy of this message | ||
From: andrew at grillet dot co dot uk
Operating system: OpenBSD
PHP version: 5.6.36
Package: FPM related
Bug Type: Bug
Bug description:serving comments
Description:
------------
I am using PHP with FPM on OpenBSD, but I do not think that is
relevant.
The issue is that I have html comments in my HTML (duh!). They are
comments, not for end user consumption. They are served to the client.
It is true that the browser will hide them from users, but, unless
debugging, I would prefer the user can't see the comments by enabling
debugging in the browser.
I would like to have a php.ini setting, or possibly php_fpm setting,
that strips html comments while serving.
I agree that the server could/should do this, but I also use Apache on
Ubuntu, and have colleagues using nginx on Macs, and the situation is
the same. All use php, so it seems to me that php is where to fix this
issue.
Test script:
---------------
index.html
-----%<-------------------
<html>
<head>
</head>
<body>
<?php
print("See this, Jimmy!<br>
(C) 1987, British Rail and others<br>");
?>
<!--
This is a comment, not for end-user consumption. I want this stripped
while serving unless debugging.
-->
</body>
</html>
-----%<-------------------
--
Edit bug report at https://bugs.php.net/bug.php?id=76393&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76393&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76393&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76393&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76393&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76393&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76393&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76393&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76393&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76393&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76393&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76393&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76393&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76393&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76393&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76393&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76393&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76393&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76393&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76393&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76393&r=mysqlcfg