diff --git a/voxvera/cli.py b/voxvera/cli.py
index 39637a1..5b7948a 100644
--- a/voxvera/cli.py
+++ b/voxvera/cli.py
@@ -44,6 +44,27 @@ DATA_DIR = Path(os.environ.get("VOXVERA_DIR", Path.home()))
CURRENT_LOCALE = {}
+def _newlines_to_br(text: str) -> str:
+ """Convert all forms of newline encoding to
for static HTML output.
+
+ Handles: real newlines, literal backslash-n (\\n), and any mix.
+ Idempotent — already-converted
tags are left alone.
+ """
+ # 1. Literal two-character sequences: backslash + n → real newline
+ s = text.replace("\\n", "\n")
+ # 2. Real newlines →
+ s = s.replace("\n", "
")
+ # 3. Collapse any triple+
runs from trailing newlines
+ while "
" in s:
+ s = s.replace("
", "
")
+ # 4. Strip leading/trailing
+ while s.startswith("
"):
+ s = s[4:]
+ while s.endswith("
"):
+ s = s[:-4]
+ return s
+
+
def _template_res(*parts) -> Traversable:
"""Return a Traversable for files under the packaged ``templates`` folder."""
if getattr(sys, 'frozen', False):
@@ -539,8 +560,7 @@ def build_assets(
# Support Markdown-style redaction ~~text~~
val_str = re.sub(r"~~(.*?)~~", r'\1', str(value))
- # Convert newlines to
so line breaks render in static HTML (no JS on Tor)
- val_str = val_str.replace("\\n", "\n").replace("\n", "
")
+ val_str = _newlines_to_br(val_str)
html = html.replace(f"{{{{t_landing_{field}}}}}", val_str)
# 2. Statically replace config placeholders {{key}}
@@ -548,8 +568,7 @@ def build_assets(
val_str = str(value)
# Support Markdown-style redaction ~~text~~ for user fields too
val_str = re.sub(r"~~(.*?)~~", r'\1', val_str)
- # Convert newlines to
so line breaks render in static HTML (no JS on Tor)
- val_str = val_str.replace("\\n", "\n").replace("\n", "
")
+ val_str = _newlines_to_br(val_str)
html = html.replace(f"{{{{{key}}}}}", val_str)
# Handle optional file attachment logic
@@ -1080,8 +1099,7 @@ def build_site():
# Support Markdown-style redaction ~~text~~
val_str = re.sub(r"~~(.*?)~~", r'\1', str(value))
- # Convert newlines to
so line breaks render in static HTML (no JS on Tor)
- val_str = val_str.replace("\\n", "\n").replace("\n", "
")
+ val_str = _newlines_to_br(val_str)
html = html.replace(f"{{{{t_landing_{field}}}}}", val_str)
# 3. Update relative path for download
@@ -1089,8 +1107,7 @@ def build_site():
# 4. Inject site-specific config data (handles any remaining {{key}} placeholders)
for key, value in data.items():
- val_str = str(value)
- val_str = val_str.replace("\\n", "\n").replace("\n", "
")
+ val_str = _newlines_to_br(str(value))
html = html.replace(f"{{{{{key}}}}}", val_str)
os.makedirs(dest_site, exist_ok=True)
diff --git a/voxvera/host/voxvera/config.json b/voxvera/host/voxvera/config.json
index c05d634..0cbb30f 100644
--- a/voxvera/host/voxvera/config.json
+++ b/voxvera/host/voxvera/config.json
@@ -4,7 +4,7 @@
"title": "TOP SECRET",
"subtitle": "DO ~~NOT~~ DISTRIBUTE",
"headline": "OPERATION VOX VERA",
- "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message. \n\nUse memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting. \n\nPrivacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.\n\nJoin us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.\n",
+ "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.
Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.
Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.
Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.",
"url_message": "Get VoxVera and start spreading your message.",
"url": "https://github.com/PR0M3TH3AN/VoxVera",
"tear_off_link": "https://voxvera.org/",
diff --git a/voxvera/host/voxvera/index.html b/voxvera/host/voxvera/index.html
index db81a8c..910dcc1 100644
--- a/voxvera/host/voxvera/index.html
+++ b/voxvera/host/voxvera/index.html
@@ -557,14 +557,7 @@
OPERATION VOX VERA
-
Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.
-
-Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.
-
-Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.
-
-Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.
-
+
Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.
Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.
Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.
Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.
diff --git a/voxvera/src/config.json b/voxvera/src/config.json
index 2458679..d224add 100644
--- a/voxvera/src/config.json
+++ b/voxvera/src/config.json
@@ -4,7 +4,7 @@
"title": "TOP SECRET",
"subtitle": "DO ~~NOT~~ DISTRIBUTE",
"headline": "OPERATION VOX VERA",
- "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message. \n\nUse memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting. \n\nPrivacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.\n\nJoin us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.\n",
+ "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.
Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.
Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.
Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.",
"url_message": "Get VoxVera and start spreading your message.",
"url": "https://github.com/PR0M3TH3AN/VoxVera",
"tear_off_link": "https://voxvera.org/",
diff --git a/voxvera/templates/voxvera/config.json b/voxvera/templates/voxvera/config.json
index 0dbcbf5..e0dab1e 100644
--- a/voxvera/templates/voxvera/config.json
+++ b/voxvera/templates/voxvera/config.json
@@ -4,7 +4,7 @@
"title": "TOP SECRET",
"subtitle": "DO ~~NOT~~ DISTRIBUTE",
"headline": "OPERATION VOX VERA",
- "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.\\n\\nUse memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.\\n\\nPrivacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.\\n\\nJoin us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.\n",
+ "content": "Break free from censorship with VoxVera. An anonymous guerrilla marketing and message-spreading tool. Whether online or in the physical world, it can empower you to spread your ideas boldly, shielded by complete anonymity (if you host over Tor). Download the code, design a flyer site, host it online and amplify your message.
Use memetic power to share your ideas in your school, workplace, online communities, or even globally. VoxVera ensures your message resonates far and wide, with tear-off sections featuring unique URLs and QR codes for easy reprinting.
Privacy can be maintained. Flyers can be shared via the Tor network, protecting hoster and users from censorship.
Join us in a revolution that values truth and transparency. Together, we can build a network of informed citizens who are unafraid to speak out.",
"url_message": "Follow this link to learn more. Use Tor Browser.",
"url": "https://voxvera.org/",
"tear_off_link": "https://voxvera.org/",