From: Matt Webb Date: Sun, 28 Sep 2014 08:03:18 +0000 (+0100) Subject: tweak to remove whitespace from html X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=88721585a041827d2b8bd80c615ca61ab41dff91;p=sirius.git tweak to remove whitespace from html --- 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