Commit 9cedefb0 authored by Michal Čihař's avatar Michal Čihař

Fix off by one

parent 868c7211
......@@ -7,7 +7,7 @@ def escape_newline(value):
'''
Escapes newlines so that they are not lost in <textarea>.
'''
if len(value[0]) >= 1 and value[0][0] == '\n':
if len(value) >= 1 and value[0] == '\n':
return '\n' + value
return value
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment