Escape "^" in the json file because it is a special character for tique search.

This commit is contained in:
zhouji
2013-12-16 17:06:12 +08:00
parent f5d0f4ecb9
commit 9a952032f4

View File

@@ -37,7 +37,7 @@ class Tipue_Search_JSON_Generator(object):
page_title = soup_title.get_text(' ', strip=True).replace('', '"').replace('', '"').replace('', "'")
soup_text = BeautifulSoup(page.content)
page_text = soup_text.get_text(' ', strip=True).replace('', '"').replace('', '"').replace('', "'").replace('', ' ')
page_text = soup_text.get_text(' ', strip=True).replace('', '"').replace('', '"').replace('', "'").replace('', ' ').replace('^', '^')
page_text = ' '.join(page_text.split())
if getattr(page, 'category') == 'None':