HtmlPruner
This class can remove things from HTML.
Description Description
Source Source
File: vendor/pelago/emogrifier/src/Emogrifier/HtmlProcessor/HtmlPruner.php
Methods Methods
- removeClassAttributeFromElements — Removes the `class` attribute from each element in `$elements`.
- removeClassesFromElements — Removes classes from the `class` attribute of each element in `$elements`, except any in `$classesToKeep`, removing the `class` attribute itself if the resultant list is empty.
- removeElementsWithDisplayNone — Removes elements that have a "display: none;" style.
- removeRedundantClasses — Removes classes that are no longer required (e.g. because there are no longer any CSS rules that reference them) from `class` attributes.
- removeRedundantClassesAfterCssInlined — After CSS has been inlined, there will likely be some classes in `class` attributes that are no longer referenced by any remaining (uninlinable) CSS. This method removes such classes.