Greenheart / pagecrypt

Password Protected Single Page Applications and HTML files
GNU Affero General Public License v3.0
242 stars 26 forks source link

Page altered in the decrypted version #49

Closed malpunek closed 7 months ago

malpunek commented 1 year ago

First of all thanks for pagecrypt. The tool is great and I love it!

I'm writing a pretty minimal landing page for my html ebook:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <style>
      body {
        width: 100%;
        padding: 0;
        margin: 0;
      }
      .title-page {
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
      }
      .title {
        font-size: 8em;
      }
      .title-page > .author {
        font-size: 3em;
      }
      .title-page > .date {
        font-size: 3em;
      }
    </style>
  </head>
  <body>
    <div class="title-page">
      <p class="title">$title$</p>
      <p class="author">$author$</p>
      <p class="date">$date$</p>
    </div>
    <div class="wrapper">$body$</div>
  </body>
</html>

It looks like this (on a mobile device): image

After encrypting (and decrypting in the browser) the captions are way bigger: image

Upon inspecting the elements the styles seem correct. I'm running the encryption with npx pagecrypt example.html example_crypt.html pass. Any idea what's causing the issue and how to circumvent it?

Greenheart commented 8 months ago

Hi! Happy you enjoy the tool :)

I have not been able to reproduce this. Can you create a minimal reproduction repo?

The tool should not modify the encrypted page - it only adds a wrapper with the decryption code + payload. Perhaps this was some issue with your website?

Greenheart commented 7 months ago

Closing this until I have enough info to reproduce this.