When you add a script or style inline Drupal\Component\Utility\Html::normalize add CDATA to the element.

<p><style> /* Styling */ body {color:red}</style></p>

is converted to:

<p><style>
<!--/*--><![CDATA[/* ><!--*/
 /* Styling */ body {color:red}
/*--><!]]>*/
</style></p>

@see: http://cgit.drupalcode.org/drupal/tree/core/modules/filter/tests/src/Ker...

Result with the remove HTML comments option enabled:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

facine created an issue. See original summary.

slydevil’s picture

Assigned: Unassigned » slydevil
Related issues: +#3025864: Incompatible with Gtranslate module
facine’s picture

Status: Active » Needs review
FileSize
850 bytes

@slydevil I've found the problem, it is a typo.

slydevil’s picture

Good catch, I just found that too!

Introduced here:
https://cgit.drupalcode.org/minifyhtml/commit/minifyhtml.module?h=7.x-1....

  • slydevil committed de6897f on 8.x-1.x authored by facine
    Issue #3038512, #3025864 by facine: Remove HTML comments option removes...
slydevil’s picture

Status: Needs review » Fixed

  • slydevil committed 07b77a1 on 7.x-1.x authored by facine
    Issue #3038512, #3025864 by facine: Remove HTML comments option removes...
slydevil’s picture

Status: Fixed » Closed (fixed)