Should I escape translated strings in a WordPress plugin or theme?

When writing a WordPress plugin recently, I wasn’t sure whether a translatable text/string is considered safe, or if it needs to escaped before being output.

Here’s a simple example:

The Problem

At first glance, that code looks like it should be safe, however what would happen if the string was translated to contained an angled bracket (< or >)?

That would result in invalid HTML code. Or even worse, what if the translation file contained a malicious <script> tag?

The Solution

Continue reading

WWWP5k 2012

Yesterday was Automattic’s Worldwide WP 5k day, so Jen and I got on our bikes and went for a ride.

We must have got distracted, because we ended up riding for 2.5 hours in the Melbourne sunshine! In typical Melbourne style, the sunshine was interspersed with plenty of cloudy (cold) periods.

All in all, it was a lovely morning, although next time I think I’ll be taking a jumper with me!

Are you a WordPress user? Make sure you do your body a favour and participate in Automattic’s Worldwide WP 5k day 2012.

Twenty Twelve theme added to WordPress 3.4-alpha


WordPress 3.4 will have a brand new theme in it – Twenty Twelve.

The initial version of which, has just been added to the development version of WordPress. The commit message explains the philosophy of Twenty Twelve:

Initial import of the Twenty Twelve theme, by Drew Strojny. This time around we’re trying something different than the previous twenty-something themes, a much more minimalist approach that affords easy use as a CMS in addition to being blog-forward. More information will be on wpdevel soon. Props drewstrojny and lancewillett.

Source: Trac Ticket #19978

I have set up a Twenty Twelve Demo Site here: http://twentytwelve.jamesc.id.au/

I’m very interested to see how it pans out!

Update 7/2/2012: The Twenty Twelve Development Team has posted an update:

This is not yet a fully working theme — we’ll be adding in more features and lots of missing styles over the next 3–4 weeks. Including post formats, comments, archives and page templates, more in-post styling, and a nav menu rework so the main content comes ahead of the navigation.

Update 2/3/2012: The Twenty Twelve theme has been delayed, and will no longer be part of WordPress 3.4. It will be in WordPress 3.5 (scheduled for later in 2012).

Amazon Web Services (AWS) in Australia?

Powered By Amazon Web Services LogoCloud solutions such as Amazon Web Services can be a cost-effective way for businesses to obtain a highly scalable online presence.

However, for performance (and privacy) reasons, many Australian business owners require their website and other data to be physically hosted in Australia.

As an Australian user of AWS, one of the recurring conversations I continue to have with other Australians is if (and when) will Amazon Web Services add an Australian region to their service offerings? Continue reading