Skip to content

Commit

Permalink
Prevent element ID and class from being duplicated in CSS manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed May 19, 2019
1 parent c20360f commit c4c1b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/sanitizers/class-amp-style-sanitizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ private function finalize_styles() {
$message .= '.' . $pending_stylesheet['node']->getAttribute( 'class' );
}
foreach ( $pending_stylesheet['node']->attributes as $attribute ) {
if ( 'id' !== $attribute->nodeName || 'class' !== $attribute->nodeName ) {
if ( 'id' !== $attribute->nodeName && 'class' !== $attribute->nodeName ) {
$message .= sprintf( '[%s=%s]', $attribute->nodeName, $attribute->nodeValue );
}
}
Expand Down

0 comments on commit c4c1b56

Please sign in to comment.