I find this a handy function to encompass a number of different string encoding routines. It allows you to do entity encoding (Ã¿), hex (Ã¡), html (&aecute;), or url encoding (%E1).
A small update is required to the CafePress box class – the one that shows a random product from your CafePress store. This is needed because there have been some additional updates to the HTML on the CafePress side, so the regular expression in the class needs updating. It’s very easy; just change line 174 for the following:
$this->cpPattern = '.*?(.*?)