From: Jakob Cornell Date: Sat, 4 Jan 2020 07:36:57 +0000 (-0600) Subject: Fix bookmarklet bug X-Git-Url: https://jcornell.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7ca334ef7a6820ce41faa9f662587e3751e3254;p=tutoring-tool.git Fix bookmarklet bug --- diff --git a/main.py b/main.py index 577a633..ac0aea7 100644 --- a/main.py +++ b/main.py @@ -165,8 +165,8 @@ def get_table_bookmarklet(records): assert "'" not in table_html js_table_literal = "'{}'".format(table_html) return ( - 'javascript:function(){document.querySelector(\'[contenteditable=\\\'true\\\']\')' - + '.innerHTML+=\'
\'+' + js_table_literal + '+\'
\';}()' + 'javascript:(function(){document.querySelector(\'[contenteditable=\\\'true\\\']\')' + + '.innerHTML+=\'
\'+' + js_table_literal + '+\'
\';})()' )