Try clicking both buttons. The JavaScript without the escapejs filter will raise an error.
In views.py you can see what the var1 variable looks like.