neuroelectro / neuroelectro_org

The NeuroElectro Project: Compiling information on neuron electrophysiology through literature text-mining.
neuroelectro.org
GNU General Public License v2.0
13 stars 4 forks source link

Quotation marks in curation interface #287

Closed dtebaykin closed 8 years ago

dtebaykin commented 8 years ago

' and probably " are interpreted as stop of message in free text fields.

dtebaykin commented 8 years ago

Just ' ends the String in javascript - happens due to (likely) Django sanitization of inputs in a form. The String leaves front-end correctly with quotes, but it arrives to the back-end (python function in views.py) with the after-quote part of the String gone.

In data_table_detail_validate.html I have created a sanitizeData() function to convert ' into ' but it works extremely slowly if called on every field in the form as it is being submitted. Needs to be either optimized or redesigned.

dtebaykin commented 8 years ago

Introduced sanitizeText(text) function, it removes all problematic characters replacing them with white space.