Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

CSS compression removes quotes and backslashes #574

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

CSS compression removes quotes and backslashes #574

GoogleCodeExporter opened this issue Apr 6, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

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

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r2235.

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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

  • Added labels: release-note

@GoogleCodeExporter
Copy link
Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant