Issue #161: Backport security fixes from Drupal 7.26, SA-CORE-2014-001.
Issue #182: Backport SA-CORE-2012-004.
Issue #181: Backports for SA-CORE-2013-001.
Merge branch '1.x' into SA-CORE-2012-004
Merge pull request #166 from quicksketch/SA-CORE-2013-001

Issue #181: Backports for SA-CORE-2013-001.
Merge pull request #165 from quicksketch/SA-CORE-2012-004

Issue #182: Backport SA-CORE-2012-004.
Merge pull request #170 from quicksketch/SA-CORE-2014-001

Issue #161: Backport security fixes from Drupal 7.26, SA-CORE-2014-001.