Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Spacing ignored when surround by <b> tag #26

Closed
scoldwell opened this issue Jun 22, 2016 · 8 comments
Closed

Spacing ignored when surround by <b> tag #26

scoldwell opened this issue Jun 22, 2016 · 8 comments

Comments

@scoldwell
Copy link

scoldwell commented Jun 22, 2016

The following causes the leading spaces to be dropped from the rendered output:

<b>&#160;&#160;&#160; Text</b><br />

Whereas the following renders fine:

&#160;&#160;&#160; <b>Text</b><br />

danfickle added a commit that referenced this issue Jun 23, 2016
The dangers of copy and pasting code! Our string width and string
replacement routines had drifted out of sync.
@danfickle
Copy link
Owner

I think this was related to #21 as the string width and replacement routines had drifted out of sync, giving an incorrect result. However, it was manifesting for me as too much space in the <b> rather than too little so, while it is likely the culprit, I can't be 100% sure that it is the same issue.

@scoldwell - How urgently do you need a release with this fix?

@scoldwell
Copy link
Author

Would sometime early next week be acceptable? We're still trying to get a release out, but I can instruct the customer how to get around the spacing issue if you need more time than that.

@danfickle
Copy link
Owner

OK, I'll do a release on Sunday or Monday night. I'll close this issue as I'm fairly certain that it's resolved.

@scoldwell
Copy link
Author

Sounds good. Thanks! Do you have a snapshot repo that I can use to test it out ahead of time?

@danfickle
Copy link
Owner

I've just set this up, so let me know if it works! Add to your pom:

 <repositories>
    <repository>
      <id>openhtmltopdf-snapshots</id>
      <name>openhtmltopdf.com snapshots repository</name>
      <url>https://snapshots.openhtmltopdf.com</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

Version is 0.0.1-RC4-SNAPSHOT

@scoldwell
Copy link
Author

Getting an error with the snapshot repo:

Connection failed with exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

@danfickle
Copy link
Owner

It turns out that Java does not yet trust Let's Encrypt https certificates.

There are a few options.

  • Ignore the invalid certificate - see link one (theoretical chance of a man in the middle attack).
  • Add the appropriate certificate to your Java implementation - see link two (complicated).
  • Wait for Oracle to fix this in an upcoming jdk (rumoured for July).
  • Forget snapshots for now and just use official releases.

http://stackoverflow.com/questions/21252800/how-to-tell-maven-to-disregard-ssl-errors-and-trusting-all-certs
https://community.letsencrypt.org/t/will-the-cross-root-cover-trust-by-the-default-list-in-the-jdk-jre/134/47

@scoldwell
Copy link
Author

Tested and fixed. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants