diff --git a/drupal/sites/all/modules/contrib/entityreference/entityreference.module b/drupal/sites/all/modules/contrib/entityreference/entityreference.module
index 2ac8c91..bf7d742 100644
--- a/drupal/sites/all/modules/contrib/entityreference/entityreference.module
+++ b/drupal/sites/all/modules/contrib/entityreference/entityreference.module
@@ -521,6 +521,11 @@ function entityreference_field_formatter_info() {
         'link' => FALSE,
       ),
     ),
+    'entityreference_entity_id' => array(
+      'label' => t('Entity id'),
+      'description' => t('Display the id of the referenced entities.'),
+      'field types' => array('entityreference'),
+    ),
     'entityreference_entity_view' => array(
       'label' => t('Rendered entity'),
       'description' => t('Display the referenced entities rendered by entity_view().'),
@@ -654,6 +659,12 @@ function entityreference_field_formatter_view($entity_type, $entity, $field, $in
       }
       break;
 
+    case 'entityreference_entity_id':
+      foreach ($items as $delta => $item) {
+        $result[$delta] = array('#markup' => check_plain($item['target_id']));
+      }
+      break;
+
     case 'entityreference_entity_view':
       foreach ($items as $delta => $item) {
         // Protect ourselves from recursive rendering.
