Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow <br> in description #501

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions templates/main.tmpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@
<div class="wrapper group-1">
<div class="thumbnail <?php p($expiry_style . ' commented_' . $commented_class . ' partic_' . $participated_class); ?>"></div><!-- Image to display the status or type of poll -->
<a href="<?php p($pollUrl); ?>" class="wrapper group-1-1">
<div class="flex-column name"> <?php p($poll->getTitle()); ?></div>
<div class="flex-column description"> <?php p($poll->getDescription()); ?></div>
<div class="flex-column name"><?php p($poll->getTitle()); ?></div>
<div class="flex-column description"><?php
$description = str_replace('<br>', ' ', $poll->getDescription());
p($description);
?></div>
</a>
<div class="flex-column actions">
<div class="icon-more popupmenu" value="<?php p($poll->getId()); ?>" id="expand_<?php p($poll->getId()); ?>"></div>
Expand Down
1 change: 1 addition & 0 deletions templates/vote.tmpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
$poll->getDescription() !== ''
) {
$description = str_replace(array('\r\n', '\r', '\n'), '<br/>', htmlspecialchars($poll->getDescription()));
$description = str_replace('&ltbr&gt;', '<br/>', $description);
} else {
$description = $l->t('No description provided.');
}
Expand Down