Pass area descriptions through check_plain() when exporting KML to ensure that ampersands are escaped. See https://stackoverflow.com/questions/48207963/the-kml-file-contains-invalid-or-unsupported-data-or-the-file-is-too-large-to-p

This commit is contained in:
Michael Stenta 2020-06-18 09:14:57 -04:00
parent 322cff29c5
commit 04b5c94766
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ function farm_map_kml_action(array $entities, $context = array()) {
// If this is an area entity (taxonomy_term), add the description.
if ($context['entity_type'] == 'taxonomy_term' && $entity->vocabulary_machine_name == 'farm_areas') {
if (!empty($entity->description)) {
$placemark['description'] = $entity->description;
$placemark['description'] = check_plain($entity->description);
}
}