View | Details | Raw Unified | Return to bug 12123
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt (-1 / +7 lines)
Lines 42-48 Link Here
42
		<td>
42
		<td>
43
            <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id %]" href="#">[% QUEUED_MESSAGE.subject %]</a>
43
            <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id %]" href="#">[% QUEUED_MESSAGE.subject %]</a>
44
            <div id="notice[% QUEUED_MESSAGE.message_id %]" class="notice">
44
            <div id="notice[% QUEUED_MESSAGE.message_id %]" class="notice">
45
                [% QUEUED_MESSAGE.content FILTER html_line_break %]
45
                [% IF QUEUED_MESSAGE.malformed %]
46
                    <p style="color: red;">Note: This notice does not contain valid HTML elements.</p>
47
                    [% QUEUED_MESSAGE.content FILTER html_line_break FILTER html %]
48
                [% ELSE %]
49
                    [% QUEUED_MESSAGE.content FILTER html_line_break %]
50
                [% END %]
51
            </code>
46
            </div>
52
            </div>
47
        </td>
53
        </td>
48
		<td>
54
		<td>
(-)a/members/notices.pl (-2 / +10 lines)
Lines 20-28 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
24
use XML::Simple;
25
23
use C4::Auth;
26
use C4::Auth;
24
use C4::Output;
27
use C4::Output;
25
use CGI qw ( -utf8 );
26
use C4::Members;
28
use C4::Members;
27
use C4::Letters;
29
use C4::Letters;
28
use C4::Members::Attributes qw(GetBorrowerAttributes);
30
use C4::Members::Attributes qw(GetBorrowerAttributes);
Lines 74-79 if (C4::Context->preference('ExtendedPatronAttributes')) { Link Here
74
    );
76
    );
75
}
77
}
76
78
79
for my $m ( @$queued_messages ) {
80
     eval { XML::Simple->new->XMLin($m->{content}); };
81
     if ( $@ ) {
82
         $m->{malformed} = 1;
83
     }
84
}
85
77
$template->param(
86
$template->param(
78
    patron             => $patron,
87
    patron             => $patron,
79
    QUEUED_MESSAGES    => $queued_messages,
88
    QUEUED_MESSAGES    => $queued_messages,
80
- 

Return to bug 12123