[Koha-bugs] [Bug 36333] Remove all empty lines from template's output

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 15 22:04:41 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36333

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at davidnind.com
  Text to go in the|                            |This removes extra blank
      release notes|                            |lines from the HTML page
                   |                            |source for OPAC and staff
                   |                            |interface pages. The HTML
                   |                            |page source should now be
                   |                            |more compact, which should
                   |                            |make it easier to read.
                   |                            |
                   |                            |(The extra blank lines are
                   |                            |caused by the way HTML
                   |                            |output is generated by the
                   |                            |Template Toolkit - it
                   |                            |includes whitespace
                   |                            |anywhere there is a
                   |                            |template tag.)

--- Comment #3 from David Nind <david at davidnind.com> ---
Testing notes (using KTD):

1. View the page source for some OPAC and staff interface pages (for example:
home pages for staff interface and OPC, and the details page for a record).

2. Notice that there are a lot of empty lines.

3. Apply the patch.

4. Repeat step 1.

5. Now notice that the JTML page source is much more compact, with minimal
extra blank lines.

Some examples:
- OPAC home page: before - 944 lines; after - 398 lines
- OPAC detail page (262 - Programming perl): before - 2487 lines; after - 1285
lines
- Staff interface home page: before - 1326 lines; after - 706 lines
- Staff detail page (262 - Programming perl): before - 2754 lines; after - 1837
lines

Example source for staff interface home page
============================================

Before
~~~~~~






<!DOCTYPE html>
<!-- TEMPLATE FILE: intranet-main.tt -->









<html lang="en">
<head>

<title>Koha staff interface</title>
<link href="/intranet-tmpl/prog/css/mainpage_23.1200007.css" type="text/css"
rel="stylesheet">




After
~~~~~


<!DOCTYPE html>
<!-- TEMPLATE FILE: intranet-main.tt -->
<html lang="en">
<head>
<title>Koha staff interface</title>
<link rel="stylesheet" type="text/css"
href="/intranet-tmpl/prog/css/mainpage_23.1200007.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token"
content="2d7ba25b9f496ed95c17a4329ad494e72ed7fff2,3a063148798d7315f4ba188017bd48dad177740b,1710535727">
<meta name="generator" content="Koha 23.12.00" />
    <style id="antiClickjack">body{display:none !important;}</style>
<link rel="shortcut icon" href="/intranet-tmpl/prog/img/favicon.ico"
type="image/x-icon" />
    <link type="text/css" rel="stylesheet"
href="/intranet-tmpl/lib/jquery/jquery-ui-1.13.2.min_23.1200007.css">
<link type="text/css" rel="stylesheet"
href="/intranet-tmpl/lib/bootstrap/bootstrap.min_23.1200007.css">
<link href="/intranet-tmpl/lib/bootstrap/bootstrap-theme.min_23.1200007.css"
type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css"
href="/intranet-tmpl/lib/fontawesome/css/fontawesome.min_23.1200007.css">
<link href="/intranet-tmpl/lib/fontawesome/css/brands.min_23.1200007.css"
type="text/css" rel="stylesheet">
<link href="/intranet-tmpl/lib/fontawesome/css/solid.min_23.1200007.css"
type="text/css" rel="stylesheet">
<link type="text/css" rel="stylesheet"
href="/intranet-tmpl/lib/datatables/datatables.min_23.1200007.css">
<link href="/intranet-tmpl/prog/css/print_23.1200007.css" type="text/css"
rel="stylesheet" media="print">
    <link type="text/css" rel="stylesheet"
href="/intranet-tmpl/prog/css/staff-global_23.1200007.css">
<!-- local colors -->
<script type="module">
    import { APIClient } from '/intranet-tmpl/prog/js/fetch/api-client.js';
    window.APIClient = APIClient;
</script>
<script>
var Koha = {};
    var CAN_user_parameters_manage_column_config = 1;
</script>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list