diff options
author | zsloan | 2020-10-06 15:35:07 -0500 |
---|---|---|
committer | zsloan | 2020-10-06 15:35:07 -0500 |
commit | 2583c3347f0f5a655df6c095a5162dc8d49c4fde (patch) | |
tree | b6bd90bb1d08c3e1ab796ab25d5e34b7a5a12a8a | |
parent | 5a91ed3bce93934a224d8fbbb7053a1980dd216c (diff) | |
download | genenetwork2-2583c3347f0f5a655df6c095a5162dc8d49c4fde.tar.gz |
Made change that should fix error when trying to change page text using ckeditor
* wqflask/wqflask/docs.py - Changed query to include casting as binary to deal with certain unicode characters in ckeditor pages
* wqflask/wqflask/views.py - Imported update_text from Docs since it previously wasn't updated, causing an error when attempting to update text
-rw-r--r-- | wqflask/wqflask/docs.py | 4 | ||||
-rw-r--r-- | wqflask/wqflask/views.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/wqflask/wqflask/docs.py b/wqflask/wqflask/docs.py index 78407e22..9fad1cf1 100644 --- a/wqflask/wqflask/docs.py +++ b/wqflask/wqflask/docs.py @@ -11,7 +11,7 @@ class Docs(object): def __init__(self, entry, start_vars={}): sql = """ - SELECT Docs.title, Docs.content + SELECT Docs.title, CAST(Docs.content AS BINARY) FROM Docs WHERE Docs.entry LIKE %s """ @@ -22,7 +22,7 @@ class Docs(object): self.content = "" else: self.title = result[0] - self.content = result[1].encode("latin1") + self.content = result[1] self.editable = "false" # ZS: Removing option to edit to see if text still gets vandalized diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index 42a10c7a..94ec7137 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -50,7 +50,7 @@ from wqflask.search_results import SearchResultPage from wqflask.export_traits import export_search_results_csv from wqflask.gsearch import GSearch from wqflask.update_search_results import GSearch as UpdateGSearch -from wqflask.docs import Docs +from wqflask.docs import Docs, update_text from wqflask.db_info import InfoPage from utility import temp_data @@ -350,7 +350,7 @@ def environments(): @app.route("/update_text", methods=('POST',)) def update_page(): - docs.update_text(request.form) + update_text(request.form) doc = Docs(request.form['entry_type'], request.form) return render_template("docs.html", **doc.__dict__) |