Don't escape more variables that are being saved to log names.

This commit is contained in:
Michael Stenta 2020-04-23 11:29:45 -04:00
parent 327894095f
commit 6bd7c0aa84
3 changed files with 3 additions and 3 deletions

View File

@ -572,7 +572,7 @@ function farm_inventory_set($asset, $inventory, $timestamp = REQUEST_TIME, $log_
$log_name = '';
if ($log_type == 'farm_observation') {
$assets_summary = farm_log_entity_label_summary('farm_asset', $asset);
$log_name = t('Inventory of !assets is @inventory', array('!assets' => $assets_summary, '@inventory' => $inventory));
$log_name = t('Inventory of !assets is !inventory', array('!assets' => $assets_summary, '!inventory' => $inventory));
}
// Create a new farm log entity.

View File

@ -64,7 +64,7 @@ function farm_livestock_weight_set($assets, $weight, $units, $timestamp = REQUES
// Set the name to: "Weight of [assets] is [weight] [units]".
$assets_summary = farm_log_entity_label_summary('farm_asset', $assets);
$log_name = t('Weight of !assets is @weight @units', array('!assets' => $assets_summary, '@weight' => $weight, '@units' => $units));
$log_name = t('Weight of !assets is !weight !units', array('!assets' => $assets_summary, '!weight' => $weight, '!units' => $units));
// If $assets isn't an array, wrap it.
if (!is_array($assets)) {

View File

@ -600,7 +600,7 @@ function farm_soil_amendment_form_submit($form, &$form_state) {
$material = $form_values['amendment']['material'];
// Set log name.
$log_name = t('Soil amendment: @qty @units @material into @area', array('@qty' => $total_amendment['value'], '@units' => $total_amendment['units'], '@material' => $material, '@area' => entity_label('taxonomy_term', $area)));
$log_name = t('Soil amendment: !qty !units !material into !area', array('!qty' => $total_amendment['value'], '!units' => $total_amendment['units'], '!material' => $material, '!area' => entity_label('taxonomy_term', $area)));
// Create a new farm quantity log.
$log = farm_quantity_log_create($log_type, $log_name, $timestamp, TRUE, array(), $measurements);