# cyrus-/papers

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
1603 lines (1313 sloc) 76.6 KB
Results for ' + s + '
' @fn def main(): input = sanitize(user_input()) results = db_execute(results_query(input)) return results_div(input) + format(results) \end{lstlisting} %\vspace{-10px} \caption{Regular string types in {\tt typy}}\label{fig:atexample} \end{figure} \begin{figure} \begin{lstlisting} import re def sanitize(s): return re.sub(r'"', re.sub(r'<', re.sub(r'>', s, '>'), '<'), '"') def results_query(s): return 'SELECT * FROM users WHERE name="' + s + '"' def results_div(s): return '
Results for ' + s + '