private function ExifContent::sanitizeValue in Exif 8
Same name and namespace in other branches
- 8.2 src/ExifContent.php \Drupal\exif\ExifContent::sanitizeValue()
Ensure no HTML or Javascript will be interpreted in the rendering process.
Parameters
string $exif_value: The value retrieve from the image.
Return value
string The value sanitized.
2 calls to ExifContent::sanitizeValue()
- ExifContent::entity_insert_update in src/
ExifContent.php - Main entry of the module.
- ExifContent::handleField in src/
ExifContent.php - Handle field by delegating to specific type handler.
File
- src/
ExifContent.php, line 416
Class
- ExifContent
- Class ExifContent make link between drupal content and file content.
Namespace
Drupal\exifCode
private function sanitizeValue($exif_value) {
if (!Unicode::validateUtf8($exif_value)) {
$exif_value = Html::escape(utf8_encode($exif_value));
}
return $exif_value;
}