| Openbravo Issue Tracking System - Openbravo ERP | 
| View Issue Details | 
| 
 | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0042475 | Openbravo ERP | A. Platform | public | 2019-12-04 14:34 | 2020-01-10 08:14 | 
| 
 | 
| Reporter | adrianromero |  | 
| Assigned To | alostale |  | 
| Priority | urgent | Severity | major | Reproducibility | always | 
| Status | closed | Resolution | fixed |  | 
| Platform |  | OS | 5 | OS Version |  | 
| Product Version |  |  | 
| Target Version |  | Fixed in Version | 3.0PR20Q2 |  | 
| Merge Request Status |  | 
| Review Assigned To | caristu | 
| OBNetwork customer | No | 
| Web browser |  | 
| Modules | Core | 
| Support ticket |  | 
| Regression level |  | 
| Regression date |  | 
| Regression introduced in release |  | 
| Regression introduced by commit |  | 
| Triggers an Emergency Pack | No | 
| 
 | 
| Summary | 0042475: Openbravo JS minimizer does not work well with template literals | 
| Description | Template 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 Reproduce | In description | 
| Proposed Solution |  | 
| Additional Information |  | 
| Tags | No tags attached. | 
| Relationships | | related to | defect | 0041093 |  | closed | jarmendariz | JS static resources are not correctly minimized |  | causes | defect | 0048070 |  | closed | platform | OOM compressing JS with certain regexp | 
 | 
| Attached Files |  | 
| 
 | 
| 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 | OBNetwork customer | => No | 
| 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 | 
| 2021-11-16 12:51 | alostale | Relationship added | causes 0048070 | 
	| Notes | 
	| 
 | 
	|  |  | 
	| 
 | 
	| 
		
			| (0116665) |  
			| hgbot |  
			| 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 |  
			| 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 |  
			| 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 |  
			| 2020-01-07 13:59 |  |  | 
	| 
 | 
	| 
		
			| (0116669) |  
			| hgbot |  
			| 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
 ---
 
 |  | 
	| 
 | 
	|  |  |