From 88721585a041827d2b8bd80c615ca61ab41dff91 Mon Sep 17 00:00:00 2001 From: Matt Webb Date: Sun, 28 Sep 2014 09:03:18 +0100 Subject: [PATCH] tweak to remove whitespace from html --- app/image_encoding.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/image_encoding.py b/app/image_encoding.py index 374e2b2..2400681 100644 --- a/app/image_encoding.py +++ b/app/image_encoding.py @@ -98,6 +98,9 @@ def rle_html(html): driver.get("about:blank") html = html.replace('"', '\\"') + html = html.replace("\n", " ") + html = html.replace("\t", " ") + html = html.replace("\r", " ") driver.execute_script("""document.write("%s")""" % html) # @TODO good grief, I can't just go putting sleeps around the place. # how else to tell when the document.write has finished rendering, and -- 2.47.3