So last month, I was attending the fairly new Cleveland Web Standards Meet-Up. I was talking to Eric Wiley about the redesign I did for the Free Times, and Eric Meyer , who came for the first time, overheard. He says "new site, huh?" and pulls out his laptop.
It's possible my heart stopped working.
His critique of my work actually went fairly well for me. He commented on the fact that the ads came before the content, which I had already fixed on my local version, but hadn't uploaded yet (if someone had told me Eric Meyer would be there...). But then he noticed what I first assumed was one of those embarrassing bugs that crop up now and again where I just forgot something that, although simple to fix, was painfully obvious.
I assumed it that I just forgot to do a conversion somewhere. It's happend before. However, the truth is much more sinister. The
The solution isn't very hard: when using PHP to print the text in question, use the
unescape() function when inserting the text. It seems silly, but works fine. I needed to use
rawurlencode() and not
someElement.title = unescape("<?= rawurlencode($cover_story['title']) ?>");
So, the lesson learned: check everything. Especially if Eric Meyer will be going through your work.
Comments (archived for posterity)
- Nate Klaiber commented
No need to echo what has already been said about the ads….
I think you have done a great job so far….
Who cares what Eric Meyer says (just kidding - couldn’t ask for a better critique from a top notch guy).
- Brad Dielman commented
The site looks fantastic, Dan. As does the rest of the portfolio.
- Richard St-Aubin commented
I replaced unescape() with decodeURIComponent() in JS. It’s solve UTF8 conversion problems.