Bug 16608

Summary: Missing entity nbsp in some XML files
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: TemplatesAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: bgkriegel, f.demians, julian.maurice, kyle
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 7141    
Bug Blocks:    
Attachments: Bug 16608 - Add xsld extension to t/00-valid-xml.t
Bug 16608 - Add xsd extension to t/00-valid-xml.t
Bug 16608 - Missing entity nbsp in some XML files
[SIGNED-OFF] Bug 16608 - Add xsd extension to t/00-valid-xml.t
[SIGNED-OFF] Bug 16608 - Missing entity nbsp in some XML files
Bug 16608 - Add xsd extension to t/00-valid-xml.t
Bug 16608 - Missing entity nbsp in some XML files

Description Fridolin Somers 2016-05-27 08:33:55 UTC
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.
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