New AMP issues detected: CSS syntax error
-
Greetings. Yesterday a new Accelerated Mobile Pages issue was detected on my site, related to an unclosed comment in the Inline Styles generated by the plugin. This is the sort of code it’s currently outputting:
/* Inline styles */ .amp-wp-inline-0f1bf07c72fdf1784fff2e164d9dca98{display:none;}.amp-wp-inline-138d714e6265bd8f1acd98fc68074908{clear:both;}.amp-wp-inline-8f1ebaee1ba2658e1373aeb6b86d1f6b{max-width:603px;}.amp-wp-inline-263b2aaa1a0ac2299e7eaf6bf3e331cd{display:block;}.amp-wp-inline-1ec320e69d7ff6114347fb43500ceaa7{float:left;overflow:hidden;max-width:155.25px;}.amp-wp-inline-e12275ce836cccc73cc708580d7a2dab{/*width:155.25px;height:108px;}.amp-wp-inline-9c93073ff59c40c84da52de52d2d8fbd{ ...
And there’s at least 4 more “amp-wp-inline-etc” classes like this after that line.
I narrowed down the generation of this statement (.amp-wp-inline-e12275ce836cccc73cc708580d7a2dab
) to the classclass-amp-style-sanitizer.php
, in the private function thereincollect_inline_styles()
; the problem is that somehow while doing the clean-up later in theprocess_style()
function call, it leaves that comment mark open but doesn’t close it afterwards. I don’t even know where it’s coming from since I don’t have any css statements of this sort, these must come from the plugin somehow. Most likely it doesn’t the statement parse correctly because it’s too close to the attribute or something.I’d appreciate any assistance with this issue.
- The topic ‘New AMP issues detected: CSS syntax error’ is closed to new replies.