New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert_image_dimensions on <link>-elements causing invalid document #629

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Apr 6, 2015

What steps will reproduce the problem?
1. Create a valid html document with <link rel="apple-touch-icon-precomposed" 
sizes="144x144" href="touchIcon.png"> in <head> section.
2. Turn on ModPagespeedEnableFilters insert_image_dimensions

What is the expected output? What do you see instead?
The touchIcon.png shouldn't be optimized by the insert_image_dimensions filter 
because width and height attribute not allowed on element link at this point, 
causing the w3c validator to flag the document as invalid markup:

<link rel="apple-touch-icon-precomposed" sizes="144x144" 
href="xtouchIcon.png,qv=1.6.pagespeed.ic.2ZMkfb7qzF.png" width="144" 
height="144">

What version of the product are you using (please check X-Mod-Pagespeed
header)?
1.3.25.3-2556

On what operating system?
CentOS 5.9

Which version of Apache?
2.2.3



Original issue reported on code.google.com by travisbo...@gmail.com on 27 Feb 2013 at 11:36

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

This was an oversight when we generalized image rewriting to cover icon links.  
It should be easy to fix.

In the mean time, you can either switch off insert_image_dimensions (possibly 
doing so just for validation and re-enabling thereafter) and/or just live with 
the extra markup, which should be ignored by the browser.

Original comment by jmaes...@google.com on 27 Feb 2013 at 2:28

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jmara...@google.com on 4 Mar 2013 at 7:45

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Should be fixed in r2589

Original comment by jmaes...@google.com on 11 Mar 2013 at 9:19

  • Changed state: Fixed
  • Added labels: release-note
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

Original comment by jkar...@google.com on 2 Apr 2013 at 3:30

  • Added labels: Milestone-v26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment