sirnack / ie7-js

Automatically exported from code.google.com/p/ie7-js
0 stars 0 forks source link

using hex values for "content" property not working #346

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. in css: a:before {
    content: "\203A";
    padding-right: 5px;
    padding-left:5px;
}

What is the expected output? What do you see instead?
should show single right-pointing angle quotation mark (›)
instead it shows "\203A"

What version of the product are you using? On what operating system?
latest version of ie7.js / tested on XP and 7

Please provide any additional information below.
my workaround:
jQuery(document).ready(function() {
    if(jQuery.browser.msie && jQuery.browser.version < 9) {
        jQuery.getScript("http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js", function() {
            jQuery(".ie7_anon").each(function() {
                jQuery(this).html("&rsaquo;");
            });
        });
    }
});

Original issue reported on code.google.com by gerasch....@gmail.com on 26 Oct 2011 at 3:49

GoogleCodeExporter commented 8 years ago
This also happens with IE9.js running on IE8.  Slightly different use case but 
we are running FontAwsome.

What steps will reproduce the problem?
Include FontAwsome and IE9.js.  Example from that Css:

.fa-play-circle-o:before {
  content: "\f01d";
}

What is the expected output? What do you see instead?
CSS in IE should show the same and the source file included.  Instead the \ is 
truncated and the resulting CSS in the browser is:

.fa-play-circle-o:before {
  content: "f01d";
}

What version of the product are you using? On what operating system?
latest version of ie9.js / tested on XP and 8

Please provide any additional information below.
It appears to happen as the CSS is read in and decoded by 
encoder.parse(selector) (line 445) and parse: (line 204).  One of the rules is 
replacing the \\ an empty string instead of a single \.

I have a sort of hacky workaround witch was to add the following after like 937.
this.cssText=this.cssText.replace(/content: 'f([a-f0-9]+)';/g,'content: 
"\\f$1";');
But this is a hack and isn't really fixing the issue directly.

Original comment by neurocor...@gmail.com on 19 Feb 2015 at 7:29