Skip to content

Commit 2fd2b1f

Browse files
committed
Fix passxord type
1 parent 1f358d3 commit 2fd2b1f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Install the package from source with pip:
5050
```bash
5151
cd mkdocs-encryptcontent-plugin/
5252
python3 setup.py sdist bdist_wheel
53-
pip3 install dist/mkdocs_encryptcontent_plugin-1.2.1-py3-none-any.whl
53+
pip3 install dist/mkdocs_encryptcontent_plugin-1.2.2-py3-none-any.whl
5454
```
5555

5656
Enable the plugin in your `mkdocs.yml`:

encryptcontent/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __encrypt_text_aes__(self, text, password):
8989

9090
def __encrypt_content__(self, content):
9191
""" Replaces page or article content with decrypt form. """
92-
ciphertext_bundle = self.__encrypt_text_aes__(content, self.config['password'])
92+
ciphertext_bundle = self.__encrypt_text_aes__(content, str(self.config['password']))
9393
decrypt_form = Template(DECRYPT_FORM_TPL).render({
9494
# custom message and template rendering
9595
'summary': self.config['summary'],
@@ -236,7 +236,7 @@ def on_post_page(self, output_content, page, config, **kwargs):
236236
else:
237237
merge_item = ""
238238
# Encrypt child items on target tags with page password
239-
cipher_bundle = self.__encrypt_text_aes__(merge_item, page.password)
239+
cipher_bundle = self.__encrypt_text_aes__(merge_item, str(page.password))
240240
encrypted_content = b';'.join(cipher_bundle).decode('ascii')
241241
# Replace initial content with encrypted one
242242
bs4_encrypted_content = BeautifulSoup(encrypted_content, 'html.parser')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def read(fname):
1111

1212
setup(
1313
name='mkdocs-encryptcontent-plugin',
14-
version='1.2.1',
14+
version='1.2.2',
1515
author='CoinK0in',
1616
author_email='[email protected]',
1717
description='A MkDocs plugin that encrypt/decrypt markdown content with AES',

0 commit comments

Comments
 (0)