Bug 16608 - Missing entity nbsp in some XML files
Summary: Missing entity nbsp in some XML files
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Keywords:
Depends on: 7141
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-27 08:33 UTC by Fridolin SOMERS
Modified: 2017-12-07 22:16 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16608 - Add xsld extension to t/00-valid-xml.t (745 bytes, patch)
2016-05-27 08:57 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 16608 - Add xsd extension to t/00-valid-xml.t (744 bytes, patch)
2016-05-27 08:58 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 16608 - Missing entity nbsp in some XML files (6.09 KB, patch)
2016-05-27 08:59 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16608 - Add xsd extension to t/00-valid-xml.t (821 bytes, patch)
2016-05-27 17:25 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16608 - Missing entity nbsp in some XML files (6.22 KB, patch)
2016-05-27 17:25 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 16608 - Add xsd extension to t/00-valid-xml.t (881 bytes, patch)
2016-06-10 14:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16608 - Missing entity nbsp in some XML files (6.28 KB, patch)
2016-06-10 14:38 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2016-05-27 08:33:55 UTC
The special character "non breaking space"   is not contained in XML syntax by default.
So we add it in the file header : 
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>

Even if the source code files do no contain this character, it can be that translated files contain it.
French for example "Titre&nbsp;:".

This entity is missing in all files in koha-tmpl/intranet-tmpl/prog/en/data/ and in some files of koha-tmpl/intranet-tmpl/prog/en/xslt.
Comment 1 Fridolin SOMERS 2016-05-27 08:40:51 UTC
Same issue as Bug 7141
Comment 2 Fridolin SOMERS 2016-05-27 08:57:29 UTC Comment hidden (obsolete)
Comment 3 Fridolin SOMERS 2016-05-27 08:58:44 UTC Comment hidden (obsolete)
Comment 4 Fridolin SOMERS 2016-05-27 08:59:11 UTC Comment hidden (obsolete)
Comment 5 Bernardo Gonzalez Kriegel 2016-05-27 17:25:39 UTC Comment hidden (obsolete)
Comment 6 Bernardo Gonzalez Kriegel 2016-05-27 17:25:48 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2016-06-10 14:38:30 UTC
Created attachment 52231 [details] [review]
Bug 16608 - Add xsd extension to t/00-valid-xml.t

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2016-06-10 14:38:34 UTC
Created attachment 52232 [details] [review]
Bug 16608 - Missing entity nbsp in some XML files

The special character "non breaking space" &nbsp; is not contained in XML syntax by default.
So we add it in the file header :
<!DOCTYPE stylesheet [<!ENTITY nbsp "&#160;" >]>

Even if the source code files do no contain this character, it can be that translated files contain it.
French for example "Titre&nbsp;:".

This entity is missing in all files in koha-tmpl/intranet-tmpl/prog/en/data/ and in some files of koha-tmpl/intranet-tmpl/prog/en/xslt.

Test plan :
  - generate French templates:
    cd misc/translator
    ./translate install fr-FR
    cd ../..
  - run test:
    prove -v t/00-valid-xml.t
    you get failing error message
  - apply this patch
  - translate again
  - run test again: it passes

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works as described following test plan
Tes pass, no errors.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Kyle M Hall 2016-06-10 17:41:14 UTC
Pushed to master for 16.11, thanks Frido!
Comment 10 Frédéric Demians 2016-06-15 07:47:35 UTC
Pushed in 16.05. Will be in 16.05.01.
Comment 11 Julian Maurice 2016-06-16 09:23:17 UTC
Patches pushed to 3.22.x, will be in 3.22.8