PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 2.2.0
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v2.2.0
2.2.0 2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 All 43 releases
← All changes | app/Functions/helpers.php +13 -1 2.1.0 → 2.2.0 View file →
@@ -1,7 +1,8 @@
1 1 <?php
2 2
3 3 use FluentBoards\App\App;
4 +use FluentBoards\App\Services\Constant;
4 5
5 6 // $app is available
6 7
7 8 if (!function_exists('fluentBoards')) {
@@ -27,8 +28,19 @@
27 28
28 29 return $url ? '[' . $url . '](' . str_replace(')', '%29', $url) . ')' : $matches[0];
29 30 }, (string) $description);
30 31
32 + // Markdown email autolinks otherwise look like disallowed HTML to KSES.
33 + $description = preg_replace_callback('/<(?:mailto:)?([^<>\s]+@[^<>\s]+)>/i', function ($matches) {
34 + $email = html_entity_decode($matches[1], ENT_QUOTES | ENT_HTML5, 'UTF-8');
35 + if (!is_email($email)) {
36 + return $matches[0];
37 + }
38 +
39 + $label = str_replace(['*', '_', '`'], ['\\*', '\\_', '\\`'], $email);
40 + return '[' . $label . '](mailto:' . $email . ')';
41 + }, $description);
42 +
31 43 // KSES encodes standalone > characters, which breaks Markdown quotes.
32 44 // Protect only quote prefixes; all HTML still passes through KSES.
33 45 $quotePrefix = 'fbs-quote-' . wp_generate_uuid4() . '-';
34 46 $quotes = [];
@@ -47,9 +59,9 @@
47 59 {
48 60 $user = get_user_by('email', $email);
49 61
50 62 if ($user) {
51 - $photo_url = get_user_meta($user->ID, 'fbs_profile_photo', true);
63 + $photo_url = get_user_meta($user->ID, Constant::PROFILE_PHOTO_META_KEY, true);
52 64 if ($photo_url) {
53 65 return apply_filters('fluent_boards/get_avatar', $photo_url, $email);
54 66 }
55 67