projects
/
oweals
/
karmaworld.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e09c986
)
adding regex to reimport javascript escaped strings when importing html
author
Charles Holbrow
<charlesholbrow@gmail.com>
Fri, 18 Jan 2013 23:57:19 +0000
(18:57 -0500)
committer
Charles Holbrow
<charlesholbrow@gmail.com>
Fri, 18 Jan 2013 23:57:19 +0000
(18:57 -0500)
bin/import_json/run.py
patch
|
blob
|
history
diff --git
a/bin/import_json/run.py
b/bin/import_json/run.py
index de362f747083fd07e234ae05f14896915236b95e..7bb1e2628a38bafefef7e9f3b8a943cf7a70a818 100644
(file)
--- a/
bin/import_json/run.py
+++ b/
bin/import_json/run.py
@@
-13,6
+13,7
@@
import os
import shutil
import datetime
import taggit
+import re
from os.path import join, exists, split, isdir
@@
-109,6
+110,10
@@
for note in note_dicts:
try:
n = Note(**note)
+ # fix the weird javascript issue
+ if n.html:
+ n.html = re.sub(r'\\(.)', r'\1', n.html)
+
# Add the tags, if any
for t in tags: n.tags.add(t)