Skip to content

Commit bfdf15a

Browse files
committed
Add BETA encrypted_something
1 parent 1209590 commit bfdf15a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

encryptcontent/decrypt-form.tpl.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h1>{{ summary }}</h1>
103103
console.log('Unknow tag html found ...');
104104
}
105105
for (i = 0; i < html_item.length; i++) {
106-
// grab the cipher ToC bundle
106+
// grab the cipher bundle
107107
var parts = html_item[i].innerHTML.split(';');
108108
// decrypt it
109109
var content = decrypt_content(
@@ -113,10 +113,10 @@ <h1>{{ summary }}</h1>
113113
parts[2]
114114
);
115115
if (content) {
116-
// success; display the decrypted ToC
116+
// success; display the decrypted content
117117
html_item[i].innerHTML = content;
118118
html_item[i].style.display = null;
119-
// any post processing on the decrypted toc should be done here
119+
// any post processing on the decrypted content should be done here
120120
}
121121
}
122122
}

encryptcontent/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ def on_post_page(self, output_content, page, config, **kwargs):
254254
else:
255255
merge_item = item.contents[0]
256256
# Encrypt childs items on target tags with page password
257-
ciphertoc_bundle = self.__encrypt_text_aes__(merge_item, page.password)
258-
encrypted_toc = b';'.join(ciphertoc_bundle).decode('ascii')
257+
cipher_bundle = self.__encrypt_text_aes__(merge_item, page.password)
258+
encrypted_content = b';'.join(cipher_bundle).decode('ascii')
259259
# Replace initial content with encrypted one
260-
bs4_encrypted_content = BeautifulSoup(encrypted_toc, 'html.parser')
260+
bs4_encrypted_content = BeautifulSoup(encrypted_content, 'html.parser')
261261
item.contents = [bs4_encrypted_content]
262262
if item.has_attr('style'):
263263
if isinstance(item['style'], list):

0 commit comments

Comments
 (0)