Merged in neleo/piler (pull request #16)

display archiving and retention rules correctly if they contain HTML entities
This commit is contained in:
Leo 2018-06-19 19:48:01 +00:00 committed by Janos SUTO
commit e2fb407884
4 changed files with 24 additions and 24 deletions

View File

@ -106,14 +106,14 @@
<?php foreach($rules as $rule) { ?> <?php foreach($rules as $rule) { ?>
<tr class="domainrow"> <tr class="domainrow">
<td><?php print $rule['from']; ?></td> <td><?php print htmlentities($rule['from']); ?></td>
<td><?php print $rule['to']; ?></td> <td><?php print htmlentities($rule['to']); ?></td>
<td><?php print $rule['subject']; ?></td> <td><?php print htmlentities($rule['subject']); ?></td>
<td><?php print $rule['body']; ?></td> <td><?php print htmlentities($rule['body']); ?></td>
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td> <td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td> <td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
<td><?php print $rule['attachment_name']; ?></td> <td><?php print htmlentities($rule['attachment_name']); ?></td>
<td><?php print $rule['attachment_type']; ?></td> <td><?php print htmlentities($rule['attachment_type']); ?></td>
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td> <td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
<td><a href="index.php?route=policy/removearchiving&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td> <td><a href="index.php?route=policy/removearchiving&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td>
</tr> </tr>

View File

@ -128,14 +128,14 @@
<?php if(ENABLE_SAAS == 1) { ?> <?php if(ENABLE_SAAS == 1) { ?>
<td><?php print $rule['domain']; ?></td> <td><?php print $rule['domain']; ?></td>
<?php } ?> <?php } ?>
<td><?php print $rule['from']; ?></td> <td><?php print htmlentities($rule['from']); ?></td>
<td><?php print $rule['to']; ?></td> <td><?php print htmlentities($rule['to']); ?></td>
<td><?php print $rule['subject']; ?></td> <td><?php print htmlentities($rule['subject']); ?></td>
<td><?php print $rule['body']; ?></td> <td><?php print htmlentities($rule['body']); ?></td>
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td> <td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td> <td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
<td><?php print $rule['attachment_name']; ?></td> <td><?php print htmlentities($rule['attachment_name']); ?></td>
<td><?php print $rule['attachment_type']; ?></td> <td><?php print htmlentities($rule['attachment_type']); ?></td>
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td> <td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
<td><?php print $rule['days']; ?></td> <td><?php print $rule['days']; ?></td>
<td><a href="index.php?route=policy/removeretention&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td> <td><a href="index.php?route=policy/removeretention&amp;id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td>

View File

@ -102,14 +102,14 @@
<?php foreach($rules as $rule) { ?> <?php foreach($rules as $rule) { ?>
<div class="domainrow"> <div class="domainrow">
<div class="domaincell"><?php print $rule['from']; ?></div> <div class="domaincell"><?php print htmlentities($rule['from']); ?></div>
<div class="domaincell"><?php print $rule['to']; ?></div> <div class="domaincell"><?php print htmlentities($rule['to']); ?></div>
<div class="domaincell"><?php print $rule['subject']; ?></div> <div class="domaincell"><?php print htmlentities($rule['subject']); ?></div>
<div class="domaincell"><?php print $rule['body']; ?></div> <div class="domaincell"><?php print htmlentities($rule['body']); ?></div>
<div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div> <div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div>
<div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div> <div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div>
<div class="domaincell"><?php print $rule['attachment_name']; ?></div> <div class="domaincell"><?php print htmlentities($rule['attachment_name']); ?></div>
<div class="domaincell"><?php print $rule['attachment_type']; ?></div> <div class="domaincell"><?php print htmlentities($rule['attachment_type']); ?></div>
<div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div> <div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div>
<div class="domaincell"><a href="index.php?route=policy/removearchiving&amp;confirmed=1&amp;id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div> <div class="domaincell"><a href="index.php?route=policy/removearchiving&amp;confirmed=1&amp;id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div>
</div> </div>

View File

@ -122,14 +122,14 @@
<?php if(ENABLE_SAAS == 1) { ?> <?php if(ENABLE_SAAS == 1) { ?>
<div class="domaincell"><?php print $rule['domain']; ?></div> <div class="domaincell"><?php print $rule['domain']; ?></div>
<?php } ?> <?php } ?>
<div class="domaincell"><?php print $rule['from']; ?></div> <div class="domaincell"><?php print htmlentities($rule['from']); ?></div>
<div class="domaincell"><?php print $rule['to']; ?></div> <div class="domaincell"><?php print htmlentities($rule['to']); ?></div>
<div class="domaincell"><?php print $rule['subject']; ?></div> <div class="domaincell"><?php print htmlentities($rule['subject']); ?></div>
<div class="domaincell"><?php print $rule['body']; ?></div> <div class="domaincell"><?php print htmlentities($rule['body']); ?></div>
<div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div> <div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div>
<div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div> <div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div>
<div class="domaincell"><?php print $rule['attachment_name']; ?></div> <div class="domaincell"><?php print htmlentities($rule['attachment_name']); ?></div>
<div class="domaincell"><?php print $rule['attachment_type']; ?></div> <div class="domaincell"><?php print htmlentities($rule['attachment_type']); ?></div>
<div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div> <div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div>
<div class="domaincell"><?php print $rule['days']; ?></div> <div class="domaincell"><?php print $rule['days']; ?></div>
<div class="domaincell"><a href="index.php?route=policy/removeretention&amp;confirmed=1&amp;id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div> <div class="domaincell"><a href="index.php?route=policy/removeretention&amp;confirmed=1&amp;id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div>