1
0
Fork 0

Fix bug with spaces.

Esse commit está contido em:
Josh Mudge 2019-03-22 18:02:51 -06:00
commit da30caaf49
1 arquivos alterados com 2 adições e 0 exclusões

Ver arquivo

@ -2,6 +2,7 @@
from flask import Flask, request, render_template
import os
import subprocess
import re
app = Flask(__name__)
@ -12,6 +13,7 @@ def my_form():
@app.route('/', methods=['POST'])
def form_post():
text = request.form['secret']
text = re.sub (r'([^a-zA-Z]+?)', '', text) # Remove all non-letters.
command = "python3 Caeser-Cipher/Caeser-Cipher.py encrypt " + str(text) + " 3"
ciphered_text = subprocess.check_output(command, shell=True)
return ciphered_text