diff --git a/auto_entitylabel.module b/auto_entitylabel.module
index d35bbb7..bb5dddc 100644
--- a/auto_entitylabel.module
+++ b/auto_entitylabel.module
@@ -376,11 +376,14 @@ function _auto_entitylabel_patternprocessor($pattern, $entity, $entity_type, $la
   if (variable_get('auto_entitylabel_php_' . $settings['key'], 0)) {
     $output = auto_entitylabel_eval($output, $entity, $language);
   }
+
   // Strip tags.
-  $strip_tags = variable_get('auto_entitylabel_strip_' . $entity_type . '_' . $entity->type, 1);
+  list(,,$bundle_name) = entity_extract_ids($entity_type, $entity);
+  $strip_tags = variable_get('auto_entitylabel_strip_' . $entity_type . '_' . $bundle_name, 1);
   if ($strip_tags) {
     $output = preg_replace('/[\t\n\r\0\x0B]/', '', strip_tags($output));
   }
+
   return $output;
 }
 
