From f18c9588c91708fc7d6c31b73223fbb7493ea401 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:30:29 +0300 Subject: [PATCH 01/19] - add maven central dependency --- README.md | 6 ++---- lib/osbcp-css-parser-1.4.jar | Bin 25606 -> 0 bytes pom.xml | 12 ++++++++++-- .../java/com/leonty/test/CSSInlinerTest.java | 7 ++++++- 4 files changed, 18 insertions(+), 7 deletions(-) delete mode 100644 lib/osbcp-css-parser-1.4.jar diff --git a/README.md b/README.md index 579440c..0f1e8a1 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,8 @@ If used for email, 'class' attributes can be removed: ##Build -The dependency com.osbcp.cssparser:cssparser:1.4 is not available -in maven central. Deploy the jar from lib/osbcp-css-parser-1.4.jar -to your own maven repository so that it fits the dependency -declaration in the pom. +The dependency com.osbcp:cssparser:1.5 is now available +in maven central. ##Changes diff --git a/lib/osbcp-css-parser-1.4.jar b/lib/osbcp-css-parser-1.4.jar deleted file mode 100644 index 72ca8132af4788fa3d44d3390e0b1a27d979dcd2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25606 zcmb4q18`*BzVA$I+qP}nwr!geI}`xyQ9 z?M`-lOh%fPZU$DGmTGc*szHfio_YIV_Wr-I~K{;_zW#4!~`91-Jkg0@g{6m}I#$1aI#7aqcBEjezk;Tg-IVHD@70ZgxOdYn^=1|j7Xn+@1-p+Oba%P0`Zh(EVmLU37+ zdpQIU(Q_)XfqN1hUt|4p%Ndt51_T3P=av4oy_6*iM*>60&av`pEm_*A3 zy2wkHyf{~6b2Pvw?f3kcC(QvO59?W>XzRw|Xhx$gq%%ew zzfU){XL+8iRWf3iYkNSqVWgq2H5a@_HA_+k^H6#Am+PvgLc2Kdg~ijF1*%j8zB-$C zZ{;=ip)z$#zbT+k%PQ%adB~*Onk_MD*XpiLcsO)!&*~=Gp<%ms;E}SZYaf=y$kwi& zvmjjOdJ2k^Q*bxW3&d&D=2T)b9j2V|cmw@w_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Rk*Irg(Bs5&GK{Sm7EXZ$*>(0v4cKgIHcwfkTAZ^*+Qs}&)^wU33yPf_sj1^AD!+J9)fkeZLkTS%@c^^@R3 z%lx4`|55XC4-iuFF-=HtCxc`5j^uMZMA@v{OH;`J_qX&Q4UT`_69Ny_#eYlh$#)K!+M^{B(roi+ ziF}G5bpM0a-_nA#F3>*dJhZZy{x0>WUE#kC9FMLC$fD{$2cwLK3;(yi{weymL?J5^ z9?P+x;w{JDHJ_>x{#%ld1r3nP{eRvs<|6+|@c&NmagzXYHuC3aZ!Gh#Ed$6a`8ZL5 i{1JMbs5}Kg`~OT^6lGxlc?stk&a?D~mWuA1.8.1 - com.osbcp.cssparser + com.osbcp cssparser - 1.4 + 1.5 org.testng testng 6.8.8 +test + \ No newline at end of file diff --git a/src/test/java/com/leonty/test/CSSInlinerTest.java b/src/test/java/com/leonty/test/CSSInlinerTest.java index 76e2f12..9e9338c 100644 --- a/src/test/java/com/leonty/test/CSSInlinerTest.java +++ b/src/test/java/com/leonty/test/CSSInlinerTest.java @@ -25,7 +25,12 @@ public void test() throws Exception { String inlinedHtml = readFile("inlined.html"); - assertEquals(CSSInliner.inlineCss(html, css, true), inlinedHtml); + //assertEquals(CSSInliner.inlineCss(html, css, true), inlinedHtml); + assertEquals(normalized(inlinedHtml), normalized(CSSInliner.inlineCss(html, css, true))); + } + + private String normalized(String text) { + return text.replaceAll("[\n\r]+", "\n"); } @Test(dataProvider = "selectorPrecedenceData") From b15f05cdc94d10c7bb3de0cf2dc6e3907500672a Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:39:03 +0300 Subject: [PATCH 02/19] - add bintray repository --- pom.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index e99f623..3051303 100644 --- a/pom.xml +++ b/pom.xml @@ -32,14 +32,29 @@ org.testng testng 6.8.8 -test + test - + --> + + + jcenter-bintray + Bintray JCenter Maven Repository + default + https://jcenter.bintray.com/ + + true + + + false + + + \ No newline at end of file From dfad61701949981911125253916624e4f91e1912 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:40:54 +0300 Subject: [PATCH 03/19] - remove eclipse settings --- .classpath | 12 ------- .project | 36 ------------------- .settings/org.eclipse.jdt.core.prefs | 12 ------- .settings/org.eclipse.m2e.core.prefs | 4 --- .settings/org.eclipse.wst.common.component | 6 ---- ....eclipse.wst.common.project.facet.core.xml | 5 --- .settings/org.jboss.ide.eclipse.as.core.prefs | 2 -- 7 files changed, 77 deletions(-) delete mode 100644 .classpath delete mode 100644 .project delete mode 100644 .settings/org.eclipse.jdt.core.prefs delete mode 100644 .settings/org.eclipse.m2e.core.prefs delete mode 100644 .settings/org.eclipse.wst.common.component delete mode 100644 .settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 .settings/org.jboss.ide.eclipse.as.core.prefs diff --git a/.classpath b/.classpath deleted file mode 100644 index 8e189f0..0000000 --- a/.classpath +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/.project b/.project deleted file mode 100644 index 9f35eb7..0000000 --- a/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - CSSInliner - - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.m2e.core.maven2Nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - - diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 107056a..0000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 84d23c8..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles=nexus -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 5439c8a..0000000 --- a/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index 5c9bd75..0000000 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/.settings/org.jboss.ide.eclipse.as.core.prefs b/.settings/org.jboss.ide.eclipse.as.core.prefs deleted file mode 100644 index cf3aa3a..0000000 --- a/.settings/org.jboss.ide.eclipse.as.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -org.jboss.ide.eclipse.as.core.singledeployable.deployableList= From 69f0d56550c3edd8d378e7da10e6afa75d9b5f87 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:42:05 +0300 Subject: [PATCH 04/19] - license is described in pom --- LICENSE | 203 -------------------------------------------------------- NOTICE | 24 ------- 2 files changed, 227 deletions(-) delete mode 100644 LICENSE delete mode 100644 NOTICE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 6b0b127..0000000 --- a/LICENSE +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 5fe1301..0000000 --- a/NOTICE +++ /dev/null @@ -1,24 +0,0 @@ -CSSInliner -Copyright 2012 Leonty Belskiy, leonti@eleonti.com. - - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - - -This project includes PMD, Copyright (c) 2002-2009, InfoEther, Inc. -All rights reserved. http://pmd.sourceforge.net/ - -This product includes software developed in part by support from the Defense -Advanced Research Project Agency (DARPA) From 34766c21fcefc70f01ee80d5433b26b99b3d64e1 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:51:17 +0300 Subject: [PATCH 05/19] - fix pom file to be able to realase to bintray --- pom.xml | 118 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 104 insertions(+), 14 deletions(-) diff --git a/pom.xml b/pom.xml index 3051303..ed1b24f 100644 --- a/pom.xml +++ b/pom.xml @@ -3,20 +3,55 @@ 4.0.0 com.leonty CSSInliner - 1.0 - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - 1.7 - 1.7 - - - - + 1.1-SNAPSHOT + Java CSS Inliner + Utility to inline css styles in html document to be used in emails. + ${github.url} + + + The Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + Leonti + https://github.com/Leonti + + + Tocco AG + https://www.tocco.ch + + + Costin Grigore + raisercostin@gmail.com + brainlight + http://raisercostin.org + + + + 7 + UTF-8 + raisercostin + CSSInliner + https://github.com/${github.user}/${github.repo} + raisercostin + maven + CSSInliner + + + + scm:git:${github.url}.git + scm:git:${github.url}.git + ${github.url} + HEAD + + + + bintray + https://api.bintray.com/maven/${bintray.user}/${bintray.repo}/${bintray.package} + + org.jsoup @@ -43,6 +78,61 @@ --> + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + ${java.version} + ${java.version} + ${project.build.sourceEncoding} + + + + maven-release-plugin + 2.5.2 + + false + release + true + + + + + + + release + + + + maven-source-plugin + + + attach-sources + + jar + + + + + + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + + + jcenter-bintray From 3efea67218aa4b813801fee0e5060923d4ddfb19 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:53:06 +0300 Subject: [PATCH 06/19] [maven-release-plugin] prepare release CSSInliner-1.1 --- pom.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index ed1b24f..719e78b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,9 +1,8 @@ - + 4.0.0 com.leonty CSSInliner - 1.1-SNAPSHOT + 1.1 Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +43,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - HEAD + CSSInliner-1.1 From ea36e4665bf05990e0fbf5d75e4096f86cfbd81e Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 12:53:13 +0300 Subject: [PATCH 07/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 719e78b..092fb8b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.1 + 1.2-SNAPSHOT Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -43,7 +43,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - CSSInliner-1.1 + HEAD From 35ef75233736eded97154fa977d833098e7a3651 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 17 Aug 2015 13:32:17 +0300 Subject: [PATCH 08/19] - fix java version --- pom.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 092fb8b..87a385d 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,8 @@ - 7 + 1.7 + 1.7 UTF-8 raisercostin CSSInliner @@ -68,14 +69,12 @@ 6.8.8 test - @@ -83,10 +82,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.0 + 3.3 - ${java.version} - ${java.version} + ${source.java.version} + ${target.java.version} ${project.build.sourceEncoding} From 4b6ac450b6c12e916b362c06c3066e63340a90e2 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Tue, 18 Aug 2015 22:02:41 +0300 Subject: [PATCH 09/19] - fix pom --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 87a385d..276fd70 100644 --- a/pom.xml +++ b/pom.xml @@ -29,8 +29,8 @@ - 1.7 - 1.7 + 1.7 + 1.7 UTF-8 raisercostin CSSInliner @@ -61,7 +61,7 @@ com.osbcp cssparser - 1.5 + 1.7 org.testng From c7cfd80c5e3ba57ec4f237822513031e9c6066bd Mon Sep 17 00:00:00 2001 From: raisercostin Date: Wed, 19 Aug 2015 09:48:19 +0300 Subject: [PATCH 10/19] - add logging - download external css files - use big production html file --- pom.xml | 5 + src/main/java/com/leonty/CSSInliner.java | 140 +++++++++++----- src/main/java/com/leonty/Try.java | 75 +++++++++ .../java/com/leonty/test/CSSInlinerTest.java | 22 ++- .../java/com/leonty/test/SelectorTest.java | 7 +- .../com/leonty/test/test2-inlined.html | 92 +++++++++++ src/test/resources/com/leonty/test/test2.html | 150 ++++++++++++++++++ 7 files changed, 447 insertions(+), 44 deletions(-) create mode 100644 src/main/java/com/leonty/Try.java create mode 100644 src/test/resources/com/leonty/test/test2-inlined.html create mode 100644 src/test/resources/com/leonty/test/test2.html diff --git a/pom.xml b/pom.xml index 276fd70..f206d5d 100644 --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,11 @@ cssparser 1.7 + + ch.qos.logback + logback-classic + 1.1.3 + org.testng testng diff --git a/src/main/java/com/leonty/CSSInliner.java b/src/main/java/com/leonty/CSSInliner.java index 3cbcb45..1e8cc32 100644 --- a/src/main/java/com/leonty/CSSInliner.java +++ b/src/main/java/com/leonty/CSSInliner.java @@ -1,5 +1,6 @@ package com.leonty; +import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -12,32 +13,56 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; +import org.jsoup.select.Selector.SelectorParseException; +import org.slf4j.LoggerFactory; import com.osbcp.cssparser.CSSParser; import com.osbcp.cssparser.PropertyValue; import com.osbcp.cssparser.Rule; public class CSSInliner { + public static final org.slf4j.Logger LOG = LoggerFactory + .getLogger(CSSInliner.class); public static String inlineCss(String html, String css) throws Exception { return inlineCss(html, css, false); } - - public static String inlineCss(String html, String css, Boolean removeAttributes) throws Exception { + + public static String cleanup(String html) { + Document doc = Jsoup.parse(html); + return doc.html(); + } + + public static String inlineCss(String html, String css, + Boolean removeAttributes) throws Exception { + Document doc = Jsoup.parse(html); + HashMap> selected = new HashMap>(); + + css += getDocumentStyles(doc); + extractSelectors(css, doc, selected); + + mergeCss(removeAttributes, selected); + + return doc.html(); + } + + public static String inlineCss(String html, Boolean removeAttributes) + throws Exception { Document doc = Jsoup.parse(html); HashMap> selected = new HashMap>(); - + String css = readDocumentStyles(doc); css += getDocumentStyles(doc); - extractSelectors(css, doc, selected); - - mergeCss(removeAttributes, selected); - + extractSelectors(css, doc, selected); + + mergeCss(removeAttributes, selected); + return doc.html(); } private static void mergeCss(Boolean removeAttributes, HashMap> selected) { - Iterator>> it = selected.entrySet().iterator(); + Iterator>> it = selected.entrySet() + .iterator(); while (it.hasNext()) { Map.Entry> pair = it.next(); @@ -52,66 +77,107 @@ private static void mergeCss(Boolean removeAttributes, if (initialStyle != null && !initialStyle.isEmpty()) { style += initialStyle; } - + pair.getKey().attr("style", style); - + // if this is used for email we don't need id and style attributes // as all of our styles are already inline if (removeAttributes) { - pair.getKey().removeAttr("class"); + pair.getKey().removeAttr("class"); } } } private static void extractSelectors(String css, Document doc, HashMap> selected) throws Exception { - List rules = CSSParser.parse(css); + extractSelectors(css, doc, selected, false); + } + private static void extractSelectors(String css, Document doc, + HashMap> selected, boolean debug) + throws Exception { + LOG.trace("extract selectors from [{}]", css); + List rules = CSSParser.parse(css); + ArrayList ignored = new ArrayList(); for (Rule rule : rules) { - for (com.osbcp.cssparser.Selector selector : rule.getSelectors()) { - - Elements elements = doc.select(selector.toString()); - - for (Element element : elements) { - - // list of selectors to apply to this element - ArrayList selectors = new ArrayList(); - - // this element already has selectors attached to it - get reference to the list of existing selectors - if (selected.containsKey(element)) { - selectors = selected.get(element); + Try validSelector = select(doc, selector.toString()); + if (validSelector.isDefined()) { + Elements elements = validSelector.get(); + for (Element element : elements) { + + // list of selectors to apply to this element + ArrayList selectors = new ArrayList(); + + // this element already has selectors attached to it + // - + // get + // reference to the list of existing selectors + if (selected.containsKey(element)) { + selectors = selected.get(element); + } + + // add new selector containing styles to this dom + // element + selectors.add(new Selector(selector.toString(), + getStyleString(rule))); + + selected.put(element, selectors); } - - // add new selector containing styles to this dom element - selectors.add(new Selector(selector.toString(), getStyleString(rule))); - - selected.put(element, selectors); + } else { + ignored.add(selector); + if (debug) + LOG.warn("Couldn't select with [" + selector.toString() + + "]", validSelector.failure()); } } } + LOG.warn("{} selectors where ignored while {} where returned. Switch to trace to get a list.",ignored.size(),selected.size()); + LOG.trace("The following selectors where ignored {}",ignored); } - - public static String getDocumentStyles(Document doc) { + + private static Try select(Document doc, String selector) { + try { + return Try.success(doc.select(selector)); + } catch (SelectorParseException e) { + return Try.failure(e); + } + } + + private static String readDocumentStyles(Document doc) throws IOException { + Elements elements = doc + .select("link[rel=stylesheet],link[type=text/css]"); + StringBuilder styles = new StringBuilder(); + for (Element style : elements) { + String url = style.attr("href"); + LOG.info("Download external css from [{}]", url); + String cssContent = Jsoup.connect(url).execute().body(); + styles.append(cssContent).append("\n"); + } + return styles.toString(); + } + + public static String getDocumentStyles(Document doc) throws IOException { Elements elements = doc.select("style"); - + String styles = ""; for (Element style : elements) { styles += style.html(); } - + // we don't need style elements anymore elements.remove(); return styles; } - + public static String getStyleString(Rule rule) { String style = ""; - + for (PropertyValue propertyValue : rule.getPropertyValues()) { - style += propertyValue.getProperty() + ": " + propertyValue.getValue() + "; "; + style += propertyValue.getProperty() + ": " + + propertyValue.getValue() + "; "; } - + return style; } } diff --git a/src/main/java/com/leonty/Try.java b/src/main/java/com/leonty/Try.java new file mode 100644 index 0000000..3a0b9a3 --- /dev/null +++ b/src/main/java/com/leonty/Try.java @@ -0,0 +1,75 @@ +package com.leonty; + +abstract class Try { + + public abstract T get(); + + public abstract Throwable failure(); + + public abstract boolean isDefined(); + + public static Try success(T value) { + return new Success(value); + } + + public static Try failure(Throwable e) { + return new Failure(e); + } + + private static class Success extends Try { + private final T value; + + public Success(T value) { + this.value = value; + } + + @Override + public T get() { + return value; + } + + @Override + public boolean isDefined() { + return true; + } + + @Override + public String toString() { + return "Success(" + value + ")"; + } + + @Override + public Throwable failure() { + throw new RuntimeException( + "The result is success. Cannot get a failure."); + } + } + + private static class Failure extends Try { + public final Throwable error; + + public Failure(Throwable error) { + this.error = error; + } + + @Override + public T get() { + throw new RuntimeException("Try thrown an exception.", error); + } + + @Override + public boolean isDefined() { + return false; + } + + @Override + public String toString() { + return "Failure(" + error + ")"; + } + + @Override + public Throwable failure() { + return error; + } + } +} \ No newline at end of file diff --git a/src/test/java/com/leonty/test/CSSInlinerTest.java b/src/test/java/com/leonty/test/CSSInlinerTest.java index 9e9338c..19b7dc9 100644 --- a/src/test/java/com/leonty/test/CSSInlinerTest.java +++ b/src/test/java/com/leonty/test/CSSInlinerTest.java @@ -12,10 +12,11 @@ import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -import static org.testng.Assert.assertEquals; +import static org.junit.Assert.*; +import org.junit.Test; +//import org.testng.annotations.Test; +//import static org.testng.AssertJUnit.assertEquals; public class CSSInlinerTest { @Test @@ -29,11 +30,22 @@ public void test() throws Exception { assertEquals(normalized(inlinedHtml), normalized(CSSInliner.inlineCss(html, css, true))); } + @Test + public void test2() throws Exception { + String html = readFile("test2.html"); + //String css = readFile("test.css"); + + String inlinedHtml = readFile("test2-inlined.html"); + + //assertEquals(CSSInliner.inlineCss(html, css, true), inlinedHtml); + assertEquals(normalized(CSSInliner.cleanup(inlinedHtml)), normalized(CSSInliner.inlineCss(html, true))); + } + private String normalized(String text) { - return text.replaceAll("[\n\r]+", "\n"); + return text.replaceAll("\\r\\n|\\n|\\r", "\n").replaceAll("\\t"," ").replaceAll("\\s+\\n","\n"); } - @Test(dataProvider = "selectorPrecedenceData") + @org.testng.annotations.Test(dataProvider = "selectorPrecedenceData") public void testSelectorPrecedence(String css, String initialStyleAttribute, String expectedStyleAttribute) throws Exception { String html = "\n" + diff --git a/src/test/java/com/leonty/test/SelectorTest.java b/src/test/java/com/leonty/test/SelectorTest.java index d51b5ff..3407df5 100644 --- a/src/test/java/com/leonty/test/SelectorTest.java +++ b/src/test/java/com/leonty/test/SelectorTest.java @@ -1,9 +1,12 @@ package com.leonty.test; import com.leonty.Selector; -import org.testng.annotations.Test; -import static org.testng.AssertJUnit.assertEquals; +import static org.junit.Assert.*; +import org.junit.Test; + +//import org.testng.annotations.Test; +//import static org.testng.AssertJUnit.assertEquals; public class SelectorTest { diff --git a/src/test/resources/com/leonty/test/test2-inlined.html b/src/test/resources/com/leonty/test/test2-inlined.html new file mode 100644 index 0000000..777f3a0 --- /dev/null +++ b/src/test/resources/com/leonty/test/test2-inlined.html @@ -0,0 +1,92 @@ + + + + Cauta - + + + + + + + + + +
+
+
+
+
+ Sandale Dama Sandale Dama Quiet Beige GMIP 752 Ilpasso.ro - Ilpasso.ro +
+
+ +
+
+
+ Sandale Dama Sandale Dama Quiet Beige GMIP 752 Sandale de dama din piele naturala cu diverse finisaje care confera versatilitate oricarei tinute de... +
+
+
+
+
+
Pret: + 399 RON + +
+
+
+
+
+
+
+ +
+ +
+ + \ No newline at end of file diff --git a/src/test/resources/com/leonty/test/test2.html b/src/test/resources/com/leonty/test/test2.html new file mode 100644 index 0000000..83316f2 --- /dev/null +++ b/src/test/resources/com/leonty/test/test2.html @@ -0,0 +1,150 @@ + + + + + Cauta - + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ + Sandale Dama Sandale Dama Quiet Beige GMIP 752 Ilpasso.ro - Ilpasso.ro + +
+
+ + +
+
+
+ Sandale Dama Sandale Dama Quiet Beige GMIP 752 Sandale de dama din piele naturala cu diverse finisaje care confera versatilitate oricarei tinute de... +
+
+
+
+
+
+ Pret: + 399 RON + + +
+
+ +
+
+
+
+ +
+ + + + + +
+ +
+ + From d540a8c5478537a644870f5fc4d6559712ea11a0 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Wed, 19 Aug 2015 09:48:50 +0300 Subject: [PATCH 11/19] [maven-release-plugin] prepare release CSSInliner-1.2 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f206d5d..2428415 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.2-SNAPSHOT + 1.2 Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - HEAD + CSSInliner-1.2 From 77724cc27473934ee6ed9ef57a70578f134f248d Mon Sep 17 00:00:00 2001 From: raisercostin Date: Wed, 19 Aug 2015 09:48:57 +0300 Subject: [PATCH 12/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2428415..c3ae9f4 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.2 + 1.3-SNAPSHOT Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - CSSInliner-1.2 + HEAD From 33bb8d65f3ca469d3be1d738b550141921af8942 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 10:05:36 +0300 Subject: [PATCH 13/19] transform html to internal css --- README.md | 9 +- src/main/java/com/leonty/CSSInliner.java | 48 +- .../java/com/leonty/test/CSSInlinerTest.java | 11 + .../com/leonty/test/test2-inlined.html | 4 - .../com/leonty/test/test2-internal.html | 7974 +++++++++++++++++ 5 files changed, 8026 insertions(+), 20 deletions(-) create mode 100644 src/test/resources/com/leonty/test/test2-internal.html diff --git a/README.md b/README.md index 0f1e8a1..642018d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,14 @@ If used for email, 'class' attributes can be removed: The dependency com.osbcp:cssparser:1.5 is now available in maven central. +##Other similar libraries +- CSS parsers + - [https://github.com/phax/ph-css](https://github.com/phax/ph-css) + - [http://stackoverflow.com/questions/1513587/looking-for-a-css-parser-in-java](http://stackoverflow.com/questions/1513587/looking-for-a-css-parser-in-java) + - [http://sourceforge.net/p/cssparser/](http://sourceforge.net/p/cssparser/) +- Other resources + - [inline vs internal vs external css](https://vineetgupta22.wordpress.com/2011/07/09/inline-vs-internal-vs-external-css/) + ##Changes v1.0 2012-02-05 Leonti Bielski @@ -28,4 +36,3 @@ Copyright 2012 Leonti Bielski, leonti.me Licensed under the Apache License, Version 2.0 - diff --git a/src/main/java/com/leonty/CSSInliner.java b/src/main/java/com/leonty/CSSInliner.java index 1e8cc32..1db009b 100644 --- a/src/main/java/com/leonty/CSSInliner.java +++ b/src/main/java/com/leonty/CSSInliner.java @@ -21,13 +21,14 @@ import com.osbcp.cssparser.Rule; public class CSSInliner { - public static final org.slf4j.Logger LOG = LoggerFactory + private static final org.slf4j.Logger LOG = LoggerFactory .getLogger(CSSInliner.class); public static String inlineCss(String html, String css) throws Exception { return inlineCss(html, css, false); } + /** Returns the cleaned html that will be used for inlining css. */ public static String cleanup(String html) { Document doc = Jsoup.parse(html); return doc.html(); @@ -37,12 +38,9 @@ public static String inlineCss(String html, String css, Boolean removeAttributes) throws Exception { Document doc = Jsoup.parse(html); HashMap> selected = new HashMap>(); - - css += getDocumentStyles(doc); + css += getInternalStyles(doc); extractSelectors(css, doc, selected); - mergeCss(removeAttributes, selected); - return doc.html(); } @@ -50,12 +48,21 @@ public static String inlineCss(String html, Boolean removeAttributes) throws Exception { Document doc = Jsoup.parse(html); HashMap> selected = new HashMap>(); - String css = readDocumentStyles(doc); - css += getDocumentStyles(doc); + String css = readExternalStyles(doc); + remvoeExternalStyles(doc); + css += getInternalStyles(doc); extractSelectors(css, doc, selected); - mergeCss(removeAttributes, selected); + return doc.html(); + } + public static String internalCss(String html) throws IOException { + Document doc = Jsoup.parse(html); + String css = readExternalStyles(doc); + css += getInternalStyles(doc); + remvoeExternalStyles(doc); + Element head = doc.head(); + head.append(""); return doc.html(); } @@ -132,8 +139,10 @@ private static void extractSelectors(String css, Document doc, } } } - LOG.warn("{} selectors where ignored while {} where returned. Switch to trace to get a list.",ignored.size(),selected.size()); - LOG.trace("The following selectors where ignored {}",ignored); + LOG.warn( + "{} selectors where ignored while {} where returned. Switch to trace to get a list.", + ignored.size(), selected.size()); + LOG.trace("The following selectors where ignored {}", ignored); } private static Try select(Document doc, String selector) { @@ -144,20 +153,29 @@ private static Try select(Document doc, String selector) { } } - private static String readDocumentStyles(Document doc) throws IOException { - Elements elements = doc - .select("link[rel=stylesheet],link[type=text/css]"); + private static String readExternalStyles(Document doc) throws IOException { + Elements elements = selectExternalStyle(doc); StringBuilder styles = new StringBuilder(); for (Element style : elements) { String url = style.attr("href"); LOG.info("Download external css from [{}]", url); String cssContent = Jsoup.connect(url).execute().body(); - styles.append(cssContent).append("\n"); + styles.append("/*external css from [").append(url).append("]*/\n").append(cssContent).append("\n"); } return styles.toString(); } - public static String getDocumentStyles(Document doc) throws IOException { + private static void remvoeExternalStyles(Document doc) { + Elements elements = selectExternalStyle(doc); + elements.remove(); + } + + private static Elements selectExternalStyle(Document doc) { + return doc + .select("link[rel=stylesheet],link[type=text/css]"); + } + + public static String getInternalStyles(Document doc) throws IOException { Elements elements = doc.select("style"); String styles = ""; diff --git a/src/test/java/com/leonty/test/CSSInlinerTest.java b/src/test/java/com/leonty/test/CSSInlinerTest.java index 19b7dc9..7c8cb57 100644 --- a/src/test/java/com/leonty/test/CSSInlinerTest.java +++ b/src/test/java/com/leonty/test/CSSInlinerTest.java @@ -41,6 +41,17 @@ public void test2() throws Exception { assertEquals(normalized(CSSInliner.cleanup(inlinedHtml)), normalized(CSSInliner.inlineCss(html, true))); } + @Test + public void testInternalStyle() throws Exception { + String html = readFile("test2.html"); + //String css = readFile("test.css"); + + String internalHtml = readFile("test2-internal.html"); + + //assertEquals(CSSInliner.inlineCss(html, css, true), inlinedHtml); + assertEquals(normalized(CSSInliner.cleanup(internalHtml)), normalized(CSSInliner.internalCss(html))); + } + private String normalized(String text) { return text.replaceAll("\\r\\n|\\n|\\r", "\n").replaceAll("\\t"," ").replaceAll("\\s+\\n","\n"); } diff --git a/src/test/resources/com/leonty/test/test2-inlined.html b/src/test/resources/com/leonty/test/test2-inlined.html index 777f3a0..c3f8da8 100644 --- a/src/test/resources/com/leonty/test/test2-inlined.html +++ b/src/test/resources/com/leonty/test/test2-inlined.html @@ -4,10 +4,6 @@ Cauta - - - - - diff --git a/src/test/resources/com/leonty/test/test2-internal.html b/src/test/resources/com/leonty/test/test2-internal.html new file mode 100644 index 0000000..f43659e --- /dev/null +++ b/src/test/resources/com/leonty/test/test2-internal.html @@ -0,0 +1,7974 @@ + + + + Cauta - + + + + + + +
+
+
+
+
+ Sandale Dama Sandale Dama Quiet Beige GMIP 752 Ilpasso.ro - Ilpasso.ro +
+
+ +
+
+
+ Sandale Dama Sandale Dama Quiet Beige GMIP 752 Sandale de dama din piele naturala cu diverse finisaje care confera versatilitate oricarei tinute de... +
+
+
+
+
+
Pret: + 399 RON + +
+
+
+
+
+
+
+ +
+ +
+ + \ No newline at end of file From 9fb48404224e94124351dbcff956be9bfebbc8ab Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 10:06:31 +0300 Subject: [PATCH 14/19] [maven-release-plugin] prepare release CSSInliner-1.3 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c3ae9f4..02f666b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.3-SNAPSHOT + 1.3 Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - HEAD + CSSInliner-1.3 From 2c116f228e08c59560d4e5e29ce544c76fb2aa73 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 10:06:38 +0300 Subject: [PATCH 15/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 02f666b..814ca63 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.3 + 1.4-SNAPSHOT Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - CSSInliner-1.3 + HEAD From fedcacb1686bc9d2d97b794c6b5fc97fef38b608 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 20:46:16 +0300 Subject: [PATCH 16/19] replaceRelativeUrls to the css file location --- src/main/java/com/leonty/CSSInliner.java | 75 ++++++++++++++++++- .../com/leonty/test/test2-internal.html | 8 +- 2 files changed, 75 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/leonty/CSSInliner.java b/src/main/java/com/leonty/CSSInliner.java index 1db009b..7f73316 100644 --- a/src/main/java/com/leonty/CSSInliner.java +++ b/src/main/java/com/leonty/CSSInliner.java @@ -1,6 +1,10 @@ package com.leonty; import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -8,6 +12,8 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; @@ -62,7 +68,7 @@ public static String internalCss(String html) throws IOException { css += getInternalStyles(doc); remvoeExternalStyles(doc); Element head = doc.head(); - head.append(""); + head.append(""); return doc.html(); } @@ -160,10 +166,72 @@ private static String readExternalStyles(Document doc) throws IOException { String url = style.attr("href"); LOG.info("Download external css from [{}]", url); String cssContent = Jsoup.connect(url).execute().body(); - styles.append("/*external css from [").append(url).append("]*/\n").append(cssContent).append("\n"); + cssContent = replaceRelativeUrls(cssContent, url); + styles.append("/*external css from [").append(url).append("]*/\n") + .append(cssContent).append("\n"); } return styles.toString(); } + private static final Pattern url1 = Pattern.compile("url\\([ ]*'([^']+)'[ ]*\\)"); + private static final Pattern url2 = Pattern.compile("url\\([ ]*\"([^\"]+)\"[ ]*\\)"); + + private static String replaceRelativeUrls(String cssContent, String url) { + String result = cssContent; + result = replaceUrlWithSeparator(result, url, "'", url1); + result = replaceUrlWithSeparator(result, url, "\"", url2); + return result; + } + + private static String replaceUrlWithSeparator(String cssContent, + String url, String separator, Pattern urlMatcher) { + try { + String result = cssContent; + Matcher m = urlMatcher.matcher(result); + StringBuffer sb = new StringBuffer(); + URI fullURL = new URI(url); + URI parent = fullURL.getPath().endsWith("/") ? fullURL.resolve("..") : fullURL.resolve("."); + while (m.find()) { + String foundUrl = m.group(1); + //System.out.println(foundUrl + "->" + isAbsoluteURL(foundUrl)); + String replacement = ""; + if (isAbsoluteURL(foundUrl)) + replacement = foundUrl; + else + replacement = parent.toString() + foundUrl; + m.appendReplacement(sb, "url("+separator+replacement+separator+")"); + } + m.appendTail(sb); + result = sb.toString(); + result = url2.matcher(result).replaceAll("url(\"$1\")"); + return result; + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + + /**@see http://stackoverflow.com/questions/10159186/how-to-get-parent-url-in-java */ + public static boolean isAbsoluteURL(String url) { + try { + final URL baseHTTP = new URL("http://example.com"); + final URL baseFILE = new URL("file:///"); + URL frelative = new URL(baseFILE, url); + URL hrelative = new URL(baseHTTP, url); + // System.err.println("DEBUG: file URL: " + frelative.toString()); + // System.err.println("DEBUG: http URL: " + hrelative.toString()); + return frelative.equals(hrelative); + } catch (MalformedURLException e) { + throw new RuntimeException(e); + } + } + + public static boolean isAbsoluteURL2(String url) { + try { + URI u = new URI(url); + return u.isAbsolute(); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } private static void remvoeExternalStyles(Document doc) { Elements elements = selectExternalStyle(doc); @@ -171,8 +239,7 @@ private static void remvoeExternalStyles(Document doc) { } private static Elements selectExternalStyle(Document doc) { - return doc - .select("link[rel=stylesheet],link[type=text/css]"); + return doc.select("link[rel=stylesheet],link[type=text/css]"); } public static String getInternalStyles(Document doc) throws IOException { diff --git a/src/test/resources/com/leonty/test/test2-internal.html b/src/test/resources/com/leonty/test/test2-internal.html index f43659e..7acfeff 100644 --- a/src/test/resources/com/leonty/test/test2-internal.html +++ b/src/test/resources/com/leonty/test/test2-internal.html @@ -14,8 +14,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../fonts/fontawesome-webfont.eot?v=4.2.0'); - src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); + src: url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/../fonts/fontawesome-webfont.eot?v=4.2.0'); + src: url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } @@ -1941,8 +1941,8 @@ } @font-face { font-family: 'Glyphicons Halflings'; - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + src: url('http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/../fonts/glyphicons-halflings-regular.eot'); + src: url('http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/../fonts/glyphicons-halflings-regular.woff') format('woff'), url('http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); } .glyphicon { position: relative; From afa7a2d0975075cf3b2866cc8cdffa46d52b68b1 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 20:53:37 +0300 Subject: [PATCH 17/19] fix javadoc error --- src/main/java/com/leonty/CSSInliner.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/leonty/CSSInliner.java b/src/main/java/com/leonty/CSSInliner.java index 7f73316..6fec2c5 100644 --- a/src/main/java/com/leonty/CSSInliner.java +++ b/src/main/java/com/leonty/CSSInliner.java @@ -209,7 +209,7 @@ private static String replaceUrlWithSeparator(String cssContent, } } - /**@see http://stackoverflow.com/questions/10159186/how-to-get-parent-url-in-java */ + /*see http://stackoverflow.com/questions/10159186/how-to-get-parent-url-in-java */ public static boolean isAbsoluteURL(String url) { try { final URL baseHTTP = new URL("http://example.com"); From f588f9a9960de06898699a960d8b3024cf5701d2 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 20:54:02 +0300 Subject: [PATCH 18/19] [maven-release-plugin] prepare release CSSInliner-1.4 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 814ca63..1942a65 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.4-SNAPSHOT + 1.4 Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - HEAD + CSSInliner-1.4 From 79518667e2a7bbc6872d7dc597666324da18fd64 Mon Sep 17 00:00:00 2001 From: raisercostin Date: Mon, 24 Aug 2015 20:54:09 +0300 Subject: [PATCH 19/19] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1942a65..1327883 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.leonty CSSInliner - 1.4 + 1.5-SNAPSHOT Java CSS Inliner Utility to inline css styles in html document to be used in emails. ${github.url} @@ -44,7 +44,7 @@ scm:git:${github.url}.git scm:git:${github.url}.git ${github.url} - CSSInliner-1.4 + HEAD