Closed Davidacu closed 1 month ago
This also occurs with the CPCSS remove script insertion when there's comment with </body>
in it.
Steps to reproduce the behavior:
<!-- </body> -->
comment to it within the body.Essentially, if there are any main structural HTML tags commented out, unintended markup can happen if that tag is a regex target within Rocket. This is a systematic issue.
I'd estimate occurrence to be very low.
Why? We haven't had any tickets about this issue. And it's uncommon to comment out structural tags.
While we do want to fix this, it is a low priority.
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug When there are HTML tags inside a commented line, WP Rocket seems to process these tags and treat them as actual source code.
Preconditions
To Reproduce Steps to reproduce the behavior:
</head>
element is commented, it should start as<!-- missing closing </head> -->
Expected behavior The comment should be![image](https://user-images.githubusercontent.com/4731836/87473316-771ca900-c5de-11ea-89a6-747a77d03199.png)
<!-- missing closing </head> -->
as in original template.Actual behavior The comment is![image](https://user-images.githubusercontent.com/4731836/87473428-aa5f3800-c5de-11ea-9a67-ef0a8cc3edec.png)
<!-- some commented tags </head><body> -->
notice that WP rocket adds an extra<body>
tag inside the comments ScreenshotsBacklog Grooming (for WP Media dev team use only)