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

CSS compression removes quotes and backslashes #574

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

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 6, 2015

What steps will reproduce the problem?
1. CSS rule for an element with an id with a '.' character in
eg:
#MyForm\.myfield { ... }
<input id="MyForm.myfield" ... />

2. modpagespeed compresses the CSS, and replaces the \. in the rule with .

http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
Defines this as valid CSS.

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

On what operating system?
Debian 6 ('Squeeze')

Which version of Apache?
Apache 2.2.16-6+squeeze8 (http://packages.debian.org/squeeze/apache2.2-bin) 


URL of broken page:
Sorry, internal dev site.


Original issue reported on code.google.com by Dev.Anu...@gmail.com on 20 Nov 2012 at 4:00

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Oh, I see, this is a problem because #Myform\.myfield specifies id 
Myform.myfield, whereas #Myform.myfield specifies id Myform with class myfield.

Thanks for the report, I'll look into this.

Original comment by sligocki@google.com on 20 Nov 2012 at 8:14

  • Changed state: Accepted
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

I've noticed another problem along similar lines.

When trying to filter by element id in quotes, the quotes are removed, meaning 
that the effect is the same again, the rule is treated as ID.class instead of 
ID.MOREID

Eg:
input[id="MyFrm.MyField"]

gets compressed to

input[id=MyFrm.MyField]

Original comment by Dev.Anu...@gmail.com on 21 Nov 2012 at 3:17

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 26 Nov 2012 at 11:56

  • Changed state: Started
  • Added labels: Milestone-v24
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

This issue was closed by revision r2235.

Original comment by sligocki@google.com on 30 Nov 2012 at 7:32

  • Changed state: Fixed
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by sligocki@google.com on 30 Nov 2012 at 7:39

  • Added labels: release-note
@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 6, 2015

Original comment by matterb...@google.com on 6 Dec 2012 at 9:51

  • Changed title: CSS compression removes quotes and backslashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment