[Patches] [PATCH] Fix for Bug 7194 - OPAC detail and recent comments pages corrections for XHTML validity
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Wed Nov 9 05:50:03 NZDT 2011
From: Owen Leonard <oleonard at myacpl.org>
Date: Tue, 8 Nov 2011 11:43:38 -0500
Subject: [PATCH] Fix for Bug 7194 - OPAC detail and recent comments pages corrections for XHTML validity
Content-Type: text/plain; charset="utf-8"
- 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
---
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 16 ++++++++++------
.../opac-tmpl/prog/en/modules/opac-showreviews.tt | 11 +++++------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
index 8cba98b..649c7aa 100755
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt
@@ -1,4 +1,4 @@
-[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › 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 %]&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 %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt
index d9a630f..fdea679 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-showreviews.tt
@@ -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' %]
--
1.7.3
More information about the Patches
mailing list