Overview
Comment: | Échapper ce qui est retourné |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
355d44b994d37ed25af0a7ea4cb687c7 |
User & Date: | bohwaz on 2017-01-17 04:14:25 |
Other Links: | branch diff | manifest | tags |
Context
2017-01-17
| ||
05:04 | Mise à jour pour Smartyer: suppression de |escape inutiles avec l'auto-escaping et des variables imbriquées avec des back quotes (utilisation de sprintf à la place) check-in: 159dbae110 user: bohwaz tags: dev | |
04:14 | Échapper ce qui est retourné check-in: 355d44b994 user: bohwaz tags: dev | |
03:57 | Passphrase_FR n'existe plus, utilisation de Security et d'un dictionnaire spécialisé check-in: 80db33d7bf user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/Template.php from [48b9c62ee7] to [08784a1c0f].
︙ | ︙ | |||
522 523 524 525 526 527 528 | $out .= ' <dd>' . $field . '</dd>'; } return $out; } | | | | | | | 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | $out .= ' <dd>' . $field . '</dd>'; } return $out; } function tpl_display_champ_membre($v, $config) { if ($config['type'] == 'checkbox') { return $v ? 'Oui' : 'Non'; } elseif ($config['type'] == 'email') { return '<a href="mailto:' . rawurlencode($v) . '">' . htmlspecialchars($v) . '</a>'; } elseif ($config['type'] == 'tel') { return '<a href="tel:' . rawurlencode($v) . '">' . htmlspecialchars($v) . '</a>'; } elseif ($config['type'] == 'url') { return '<a href="' . htmlspecialchars($v) . '">' . htmlspecialchars($v) . '</a>'; } elseif ($config['type'] == 'country') { return Utils::getCountryName($v); } elseif ($config['type'] == 'multiple') { $out = []; foreach ($config['options'] as $b => $name) { if ($v & (0x01 << $b)) $out[] = $name; } return implode(', ', $out); } else { return htmlspecialchars($v); } } $tpl->register_function('csrf_field', 'Garradin\tpl_csrf_field'); $tpl->register_function('form_field', 'Garradin\tpl_form_field'); $tpl->register_function('select_compte', 'Garradin\tpl_select_compte'); |
︙ | ︙ |