Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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:
Comment | File | Size | Author |
---|---|---|---|
#3 | minifyhtml-fix_typo-3038512-3.patch | 850 bytes | facine |
minifyhtml-html_comments.png | 27.33 KB | facine |
Comments
Comment #2
slydevil CreditAttribution: slydevil commentedComment #3
facine CreditAttribution: facine as a volunteer and at Cambrico commented@slydevil I've found the problem, it is a typo.
Comment #4
slydevil CreditAttribution: slydevil commentedGood catch, I just found that too!
Introduced here:
https://cgit.drupalcode.org/minifyhtml/commit/minifyhtml.module?h=7.x-1....
Comment #6
slydevil CreditAttribution: slydevil commentedComment #8
slydevil CreditAttribution: slydevil commented