tags:

views:

522

answers:

4

Gotta be something I'm doing wrong when converting the ttf with OpensIFRr, but I'm seeing %20 chars for non-breaking spaces in all sIFR'd text. I'm using the 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 which font I use, TIA...

-Jay

A: 

Looks like an issue with the jQuery plugin to me. Try using the official sIFR release and see if that helps.

Mark Wubben
I'll give it a shot, funny though, initially the plugin worked beautifully. I literally add three lines of js and all is configured - no idea what happened, maybe I'll just roll back my git repo. It would sure be nice to avoid all the additional configuration, although it is a trade off to not be able to update sIFR directly. It's amazing how little documentation that plugin has, but despite it's faults it does increase sIFR's exposure and appeals to a wider audience.
Jay Carroll
+1  A: 

So I had this problem a few weeks ago and decided to just revert to the older version of this plug-in that I had used on a previous site successfully. I couldn't find the old version anymore so I thought it was about time to do something useful and decided to fix this problem. After a bit of digging through the program I found out what was going on.

In the process of building the PARAM tag the swfobject.js plugin urlencodes the data that is being passed to it. Not sure what Neal's reasons were for doing this but if this is bypassed, upon initial testing everything seems to work fine.

Say what?

In the swfobject.js file, look for 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'm going to write the author an email and see if he wants to include this fix in his next official release.

Cody Schneider
A: 

Thanks for the fix, worked great for me - also fixed problems with german umlauts like äöü...

florian
A: 

Seems like there's a duplicate escape call.

Changing

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 may prevent other problems (that escaping solved in the first place).

Ignacio Thayer