From 487465a73d1c2852b2dc67eba21dbfe2854b5fef Mon Sep 17 00:00:00 2001 From: Charles Holbrow Date: Fri, 18 Jan 2013 18:57:19 -0500 Subject: [PATCH] adding regex to reimport javascript escaped strings when importing html --- bin/import_json/run.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/import_json/run.py b/bin/import_json/run.py index de362f7..7bb1e26 100644 --- 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) -- 2.25.1