Skip to content

Commit

Permalink
fixed: keep special characters intact in downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Nov 9, 2020
1 parent b16c23b commit 008df96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion actions/event_manager/attendees/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
fputcsv($fh, array_keys($rows[0]), ';');

foreach ($rows as $row) {
fputcsv($fh, array_values($row), ';');
$decoded_rows = array_map(function($row) {
return html_entity_decode($row);
}, array_values($row));

fputcsv($fh, $decoded_rows, ';');
}

$contents = '';
Expand Down
2 changes: 1 addition & 1 deletion views/default/event_manager/event/addthisevent.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$start = $event->getStartDate('d/m/Y H:i:00');
$end = $event->getEndDate('d/m/Y H:i:00');

$title = $event->getDisplayName();
$title = html_entity_decode($event->getDisplayName());

$description = '';
if (!empty($event->location)) {
Expand Down
2 changes: 1 addition & 1 deletion views/default/js/addthisevent.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var addthisevent = function() {
}
if (addthisevent.hasclass(g[m], '_summary') || addthisevent.hasclass(g[m], 'summary') || addthisevent.hasclass(g[m], 'title')) {
g[m].style.display = 'none';
f += '&dsum=' + encodeURIComponent(addthisevent.htmlencode(g[m].innerHTML))
f += '&dsum=' + encodeURIComponent(g[m].innerHTML)
}
if (addthisevent.hasclass(g[m], '_description') || addthisevent.hasclass(g[m], 'description')) {
g[m].style.display = 'none';
Expand Down

0 comments on commit 008df96

Please sign in to comment.