Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0042475
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2019-12-04 14:342020-01-10 08:14
ReporteradrianromeroView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR20Q2
StatusclosedFix in branchFixed in SCM revisionb032fd12d0bc
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0042475: Openbravo JS minimizer does not work well with template literals

DescriptionTemplate literals are incorrectly minimized. For example:

      const body = `<?xml version="1.0" encoding="utf-8" ?>
      <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> [^]
      <s:Body>
      <printerFiscalReport>
      <printXReport/>
      </printerFiscalReport>
      </s:Body>
      </s:Envelope>`;

Is transformed into

const body = `<?xml version="1.0"encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><printerFiscalReport><printXReport/></printerFiscalReport></s:Body></s:Envelope> [^]`;

Note returns are removed and the most important the space between version="1.0" encoding="utf-8" is removed too and this raises an error in the XML parser.
Steps To ReproduceIn description
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0041093 closedjarmendariz JS static resources are not correctly minimized 

-  Notes
(0116107)
alostale (developer)
2019-12-05 13:56

See merge request: https://gitlab.com/openbravocode/product/openbravo/merge_requests/24 [^]
(0116665)
hgbot (developer)
2020-01-07 13:59

Repository: erp/devel/pi
Changeset: fdda1b575ec5ba03ed254f2facc7e22d6ce5d68a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 05 11:48:54 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/fdda1b575ec5ba03ed254f2facc7e22d6ce5d68a [^]

related to BUG-42475: add existent JS compressor test case to CI

---
M modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/test/CompressionTest.java
M src-test/src/org/openbravo/test/AllAntTaskTests.java
---
(0116666)
hgbot (developer)
2020-01-07 13:59

Repository: erp/devel/pi
Changeset: 29e42a017dcb6b80c901ee003a025be0bf2a21be
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 05 13:05:29 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/29e42a017dcb6b80c901ee003a025be0bf2a21be [^]

related to BUG-42475: added test cases

---
M modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/test/CompressionTest.java
A modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/test/test-compession-multiline-template-literal.js
A modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/test/test-compession-spaces-template-literal.js
---
(0116667)
hgbot (developer)
2020-01-07 13:59

Repository: erp/devel/pi
Changeset: d92c1b83814591a9e0a0706a4623e829d062e1c1
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 05 13:06:49 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d92c1b83814591a9e0a0706a4623e829d062e1c1 [^]

related to BUG-42475: replaced jsmin.jar with its sources

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSCompressor.java
A modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSMin.java
R modules/org.openbravo.client.kernel/lib/runtime/jsmin.0.2.4.jar
---
(0116668)
hgbot (developer)
2020-01-07 13:59

Repository: erp/devel/pi
Changeset: 38c4f8c4d43766990d1397af08dc9da6ed003d7d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 05 13:08:08 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/38c4f8c4d43766990d1397af08dc9da6ed003d7d [^]

related to BUG-42475: removed warnings in JSMin

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSMin.java
---
(0116669)
hgbot (developer)
2020-01-07 13:59

Repository: erp/devel/pi
Changeset: b032fd12d0bc000fff7bd8a786b0238b4bb1824a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Dec 05 13:38:45 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b032fd12d0bc000fff7bd8a786b0238b4bb1824a [^]

fixed BUG-42475: JS compression supports template literals

  Previously they were not supported as ` was not considered as string
  delimiter.

  Fixed by taking into account ` can be a string delimiter. Also in this
  case new lines must be preserved.

---
M legal/Licensing.txt
M modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/test/CompressionTest.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSCompressor.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSMin.java
M src-test/src/org/openbravo/test/AllAntTaskTests.java
---
(0116750)
caristu (developer)
2020-01-10 08:14

https://gitlab.com/openbravo/product/openbravo/merge_requests/24 [^]

- Issue History
Date Modified Username Field Change
2019-12-04 14:34 adrianromero New Issue
2019-12-04 14:34 adrianromero Assigned To => platform
2019-12-04 14:34 adrianromero Modules => Core
2019-12-04 14:34 adrianromero Triggers an Emergency Pack => No
2019-12-05 12:15 alostale Relationship added related to 0041093
2019-12-05 13:56 alostale Assigned To platform => alostale
2019-12-05 13:56 alostale Note Added: 0116107
2020-01-07 13:59 hgbot Checkin
2020-01-07 13:59 hgbot Note Added: 0116665
2020-01-07 13:59 hgbot Checkin
2020-01-07 13:59 hgbot Note Added: 0116666
2020-01-07 13:59 hgbot Checkin
2020-01-07 13:59 hgbot Note Added: 0116667
2020-01-07 13:59 hgbot Checkin
2020-01-07 13:59 hgbot Note Added: 0116668
2020-01-07 13:59 hgbot Checkin
2020-01-07 13:59 hgbot Note Added: 0116669
2020-01-07 13:59 hgbot Status new => resolved
2020-01-07 13:59 hgbot Resolution open => fixed
2020-01-07 13:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b032fd12d0bc000fff7bd8a786b0238b4bb1824a [^]
2020-01-07 14:06 alostale Review Assigned To => caristu
2020-01-10 08:14 caristu Note Added: 0116750
2020-01-10 08:14 caristu Status resolved => closed
2020-01-10 08:14 caristu Fixed in Version => 3.0PR20Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker