Fixed minor bug
This commit is contained in:
parent
e82e80ad39
commit
3cd8fcea28
|
@ -188,8 +188,9 @@ def addNote():
|
|||
text = request.values['entryText'].strip()
|
||||
if request.method == 'POST' and text != '':
|
||||
try:
|
||||
encodedStr = text
|
||||
decodedStr = base64.urlsafe_b64decode(encodedStr.encode('utf-8')).decode('utf-8')
|
||||
encodedStr = text.strip()
|
||||
decodedStrPart = base64.urlsafe_b64decode(encodedStr.encode('utf-8')).decode('utf-8')
|
||||
decodedStr = unquote(decodedStrPart)
|
||||
|
||||
notesListDecoded.append(decodedStr)
|
||||
notesListEncoded.append(encodedStr)
|
||||
|
|
|
@ -83,11 +83,9 @@ const deleteAllTextAction = () => {
|
|||
|
||||
const createFormData = (entry) => {
|
||||
let form = new FormData();
|
||||
for (var i = 0; i < entry.length; i++) {
|
||||
// Encoded special characters then encode to b64
|
||||
encodedStr = window.btoa(encodeURIComponent(note))
|
||||
form.append("entryText", encodedStr);
|
||||
}
|
||||
// Encoded special characters then encode to b64
|
||||
encodedStr = window.btoa(encodeURIComponent(entry))
|
||||
form.append("entryText", encodedStr);
|
||||
return form;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue