When I made my planter recently (about 5 feet long and a foot wide internally) I lined it with the bags my compost came in.
With regards to chemicals leaching into the soil - I believe it can happen. I can't remember where I saw it, but when I was deciding whether or not to line the planter I read something about a study that showed chemicals leaching from the wood quite quickly when it was in direct contact with rich compost.
Whether that would then transfer to any food you grew in there I don't know.
It's not a cheap option, but pond liner will do the trick. Not all pond liners are equal, do your homework and you'll see which ones are suitable for different knids of pond (there's a difference between one for water plants and one for fish, for example) - the ones that are suitable for fish shouldn't leach when used in a raised bed or planter.
The one drawback?
It's rather pricey - hence me using compost bags instead.
EDIT:
Alternatively, don't make the beds from wood at all. Try your hand a bricklaying. They will be far more durable, can look pretty good and won't leach anything unpleaseant (whether or not treated timber would).
FURTHER EDIT:
Do you particularly need raised beds? As he just said, Wizer used them on his allotment - I have no plans to use them on mine. In fact, the 80-something (84 maybe) year old Italian who is 2 plots over from me won "best allotment" this summer. If I recall correctly it was something like a North West competition - can't be sure though.
He walks with a stick, slowly, but manages just fine with ground level beds.
Not knocking raised beds at all, they have their up sides, especially if you have back trouble, but they might not be necessary.
Good luck whatever you do though... I hope you get some good crops (I'm told it's time to put in onions and garlic by a few folk online and the above mentioned Italian - it's about time for some others too, not least overwinter green manure and a brassica called "green in snow" - there's more too I think - so get it done quick and you'll have a nice early crop when you're sowing more stuff next year!)