Fix for Bug 7194 - OPAC detail and recent comments pages corrections for XHTML validity

- Adding html filter to subtitle output to correct unescaped ampersands
- Adding missing alt attributes to libravatar output
- Removing unecessary markup  from comments page

Bonus: Adding html_break filter to output of comments to preserve line breaks
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Owen Leonard 2011-11-08 11:43:38 -05:00 committed by Paul Poulain
parent 0d9309e520
commit fe9312a124
2 changed files with 15 additions and 12 deletions

View file

@ -1,4 +1,4 @@
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield %][% END %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %]
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/JavaScript" language="JavaScript">
@ -249,7 +249,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% IF ( OPACXSLTDetailsDisplay ) %]
[% XSLTBloc %]
[% ELSE %]
<h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield %] [% END %]</span>[% END %]</h1>
<h1 class="title">[% title |html %][% IF ( subtitle ) %] <span class="subtitle">[% FOREACH subtitl IN subtitle %][% subtitl.subfield |html %] [% END %]</span>[% END %]</h1>
[% IF ( author ) %]<h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% author |url %]">[% author |html %]</a></h5>[% END %]
<span class="results_summary">[% UNLESS ( item_level_itypes ) %]
@ -853,21 +853,23 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% IF ( review.your_comment ) %]
<div class="commentline yours" id="c[% review.reviewid %]">
[% IF ( review.avatarurl ) %]
<img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
<img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
[% END %]
<h5>
Your Comment
</h5>
<small>[% review.datereviewed %]</small>
<p>
[% review.review %]
[% FILTER html_break %]
[% review.review |html %]
[% END %]
<a href="#" onclick="Dopop('/cgi-bin/koha/opac-review.pl?biblionumber=[% review.biblionumber %]&amp;reviewid=[% review.reviewid %]');">Edit</a>
</p></div>
[% ELSE %]
<div class="commentline">
[% IF ( ShowReviewer ) %]
[% IF ( review.avatarurl ) %]
<img class="avatar" src="[% review.avatarurl %]" height="80" width="80"/>
<img class="avatar" src="[% review.avatarurl %]" height="80" width="80" alt="" />
[% END %]
<h5>
Comment by
@ -878,7 +880,9 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
[% END %]
<small>[% review.datereviewed %]</small>
<p>
[% review.review %]
[% FILTER html_break %]
[% review.review |html %]
[% END %]
</p></div>
[% END %]
[% END %]

View file

@ -14,7 +14,7 @@ $(document).ready(function(){
<div id="bd">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
<div class="yui-b"><div id="usershowreviews" class="container">
<div id="usershowreviews" class="container">
<div id="recentcomments" class="searchresults">
<h3>Recent comments</h3>
<table>
@ -28,7 +28,7 @@ $(document).ready(function(){
[% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber |url %]#comments" title="View details for this title">
[% END %]
[% END %]
[% IF ( review.title ) %][% review.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield %][% END %]</a>
[% IF ( review.title ) %][% review.title %][% ELSE %]No title[% END %] [% FOREACH subtitl IN review.subtitle %] [% subtitl.subfield |html %][% END %]</a>
[% IF ( review.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author %]</a></p>
[% END %]
<p>
@ -48,16 +48,16 @@ $(document).ready(function(){
<p class="commentline[% IF ( review.your_comment ) %] yours[% END %]">
[% IF ( review.avatarurl ) %]
<img class="avatar" src="[% review.avatarurl %]" height="40" width="40"/>
<img class="avatar" src="[% review.avatarurl %]" height="40" width="40" alt="" />
[% END %]
[% FILTER html_break %]
[% review.review |html %]
[% END %]
<span style="font-size:87%;font-color:#CCC;">Added [% review.datereviewed %] [% IF ( review.your_comment ) %] by <strong>you</strong>[% ELSE %]
[% IF ( ShowReviewer ) %] by
[% review.firstname %] [% review.surname %][% END %][% END %]</span></p>
</td>
<td>
<a class="p1" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% review.biblionumber %]">
[% IF ( review.BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
[% ELSE %]
[% IF ( review.BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% review.biblionumber |url %]" title="View details for this title">
@ -93,7 +93,6 @@ $(document).ready(function(){
</div>
</div>
</div>
</div>
[% IF ( OpacNav ) %]
<div class="yui-b"><div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' %]