protected function ExifSettingsController::sanitizeValue in Exif 8
Same name and namespace in other branches
- 8.2 src/Controller/ExifSettingsController.php \Drupal\exif\Controller\ExifSettingsController::sanitizeValue()
Escape a string by using HTML entities.
Parameters
string $exif_value: UTF8 values to be escaped.
Return value
string value with HTML Entities.
1 call to ExifSettingsController::sanitizeValue()
- ExifSettingsController::showSample in src/
Controller/ ExifSettingsController.php - Create a sample HTML Fragment.
File
- src/
Controller/ ExifSettingsController.php, line 533
Class
- ExifSettingsController
- Class ExifSettingsController manage action of settings pages.
Namespace
Drupal\exif\ControllerCode
protected function sanitizeValue($exif_value) {
if (!Unicode::validateUtf8($exif_value)) {
$exif_value = Html::escape(utf8_encode($exif_value));
}
return $exif_value;
}