Skip to content

Commit 38d57cd

Browse files
committed
encode CR and TAB for string values
1 parent 86eb856 commit 38d57cd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Change log
22

3+
### 0.2.6
4+
+ Add cr, tab to contract text encoding
5+
36
### 0.2.5
47
+ Rename contract 'register' to 'register_contract_name'
58

convex_api/contract.py

+2
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,6 @@ def escape_string(text):
188188
"""
189189
escape_text = re.sub('\\\\', '\\\\\\\\', text)
190190
escape_text = re.sub('"', '\\"', escape_text)
191+
escape_text = re.sub('\n', '\\\\n', escape_text)
192+
escape_text = re.sub('\t', '\\\\t', escape_text)
191193
return escape_text

0 commit comments

Comments
 (0)