SIFR encoding non-breaking char space -% 20
There must be what I am doing wrong when converting ttf with OpensIFRr, but I see% 20 characters for non-breaking spaces in all sIFR'd text. I am using jQuery sIFR plugin (3.04) with the following:
<div><h1>My Example Text</h1></div>
...
<script type="text/javascript">
<!--
var $j = jQuery;
$j(document).ready(function(){
$j('h1').sifr({
path: '/fonts/',
font: 'fancy_script'
});
});
//-->
</script>
Happens no matter what font I use.
a source to share
So, I had this problem a few weeks ago and decided to just revert to an older version of this plugin that I used on a previous site. I couldn't find the old version anymore, so I thought it was time to do something useful and decided to fix the problem. After a bit of searching for the program, I found out what was going on.
During the creation of the PARAM tag, the swfobject.js urlencodes plugin passes the data that is passed to it. Not sure if there was a reason for Neal to do this, but if it gets around it then on initial testing everything seems to be working fine.
Tell me what?
In the swfobject.js file, find this line here:
bArr.push([b, '=', win.escape(win.escape(paramAttributes[a][b]))].join(x));
and change it to this:
bArr.push([b, '=', paramAttributes[a][b]].join(x));
I'll write to the author and see if he wants to include this fix in his next official release.
a source to share
There seems to be a duplicate escape call.
The change
bArr.push ([b, '=', win.escape (win.escape (paramAttributes [a] [b]))]. join (x));
to
bArr.push ([b, '=', win.escape (paramAttributes [a] [b])]. join (x));
Also works and can prevent other problems (which are fixed in the first place).
a source to share