diff --git a/flexslider_picture/theme/flexslider_picture.theme.inc b/flexslider_picture/theme/flexslider_picture.theme.inc
index 1c2c678..fcbfdfe 100644
--- a/flexslider_picture/theme/flexslider_picture.theme.inc
+++ b/flexslider_picture/theme/flexslider_picture.theme.inc
@@ -24,7 +24,7 @@ function template_preprocess_flexslider_picture_list(array &$vars) {
     $fallback_image_style = $optionset->fallback;
     $mappings = picture_mapping_load($optionset->mapping);
     if (!$mappings) {
-      trigger_error("Unable to load picture mapping {$optionset->mapping}.", E_USER_ERROR);
+      trigger_error(check_plain("Unable to load picture mapping {$optionset->mapping}."), E_USER_ERROR);
       return;
     }
     $breakpoint_styles = picture_get_mapping_breakpoints($mappings, $fallback_image_style);
@@ -41,7 +41,7 @@ function template_preprocess_flexslider_picture_list(array &$vars) {
       $colorbox_fallback_image_style = $optionset->options['colorboxFallbackImageStyle'];
       $mappings = picture_mapping_load($optionset->options['colorboxImageStyle']);
       if (!$mappings) {
-        trigger_error("Unable to load picture mapping {$optionset->options['colorboxImageStyle']}.", E_USER_ERROR);
+        trigger_error(check_plain("Unable to load picture mapping {$optionset->options['colorboxImageStyle']}."), E_USER_ERROR);
         $optionset->options['colorboxEnabled'] = FALSE;
       }
       else {
diff --git a/picture.file_entity_1.inc b/picture.file_entity_1.inc
index 0e70c26..7f8a217 100644
--- a/picture.file_entity_1.inc
+++ b/picture.file_entity_1.inc
@@ -47,7 +47,7 @@ function picture_file_formatter_picture_view($file, $display, $langcode) {
     $group_name = $display['settings']['picture_group'];
     $mappings = picture_mapping_load($group_name);
     if (!$mappings) {
-      trigger_error("Unable to load picture mapping $group_name.", E_USER_ERROR);
+      trigger_error(check_plain("Unable to load picture mapping $group_name."), E_USER_ERROR);
       return;
     }
     $breakpoint_styles = picture_get_mapping_breakpoints($mappings, $fallback_image_style);
diff --git a/picture.module b/picture.module
index dd27eec..3c5d2fb 100644
--- a/picture.module
+++ b/picture.module
@@ -774,7 +774,7 @@ function picture_field_formatter_picture_view($entity_type, $entity, $field, $in
   if (isset($mapping_name) && !empty($mapping_name)) {
     $picture_mapping = picture_mapping_load($mapping_name);
     if (!$picture_mapping) {
-      trigger_error("Unable to load picture mapping $mapping_name.", E_USER_ERROR);
+      trigger_error(check_plain("Unable to load picture mapping $mapping_name."), E_USER_ERROR);
       return $element;
     }
   }
@@ -798,7 +798,7 @@ function picture_field_formatter_picture_view($entity_type, $entity, $field, $in
     $formatter = 'picture_formatter_colorbox';
     $mappings = picture_mapping_load($display['settings']['colorbox_settings']['colorbox_group']);
     if (!$mappings) {
-      trigger_error("Unable to load picture mapping {$display['settings']['colorbox_settings']['colorbox_group']}.", E_USER_ERROR);
+      trigger_error(check_plain("Unable to load picture mapping {$display['settings']['colorbox_settings']['colorbox_group']}."), E_USER_ERROR);
       return $element;
     }
     $colorbox_breakpoints = picture_get_mapping_breakpoints($mappings, $colorbox_fallback_image_style);
