From 4a5e99c34e4a91bcd54d32ec26a3fe450ceb7908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20G=C3=BCnal?= Date: Thu, 12 Apr 2018 20:33:33 +0300 Subject: [PATCH] =?UTF-8?q?giri=C5=9F=20kontrol=C3=BC=20-=20backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JS kontrolü trafik bölünerek atlatılırsa backend de kabul edilmeyen karakterler silinir (rakamlar, özek karakterler). --- app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.py b/app.py index de521c3..777267b 100644 --- a/app.py +++ b/app.py @@ -20,6 +20,7 @@ from urllib.request import urlopen import utilities import db +import re #initalize our flask app app = Flask(__name__) @@ -63,6 +64,7 @@ def predict(): result = {"success": False} userText = request.get_data().decode('utf-8') + userText = re.sub('[^a-zA-ZğüşöçİĞÜŞÖÇ]', '', userText) print(userText) kok = kokBul(userText)