]> git.aero2k.de Git - sirius.git/commitdiff
tweak to remove whitespace from html
authorMatt Webb <matt@interconnected.org>
Sun, 28 Sep 2014 08:03:18 +0000 (09:03 +0100)
committerMatt Webb <matt@interconnected.org>
Sun, 28 Sep 2014 08:03:18 +0000 (09:03 +0100)
app/image_encoding.py

index 374e2b28aabf5a478657392379656e17f0dcdabf..24006818f155ba4df1c747138edfc5451093593f 100644 (file)
@@ -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