From 31012d782f64727de1d86662139e9ec6618043c5 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 2 Jun 2016 12:53:12 +1200 Subject: Consolidate some functions to strutils.bytes_to_escaped_str --- pathod/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pathod/app.py') diff --git a/pathod/app.py b/pathod/app.py index 7e9860b9..e3216c58 100644 --- a/pathod/app.py +++ b/pathod/app.py @@ -3,8 +3,9 @@ import pprint import io import copy from flask import Flask, jsonify, render_template, request, abort, make_response -from . import version, language, utils +from . import version, language from netlib.http import user_agents +from netlib import strutils logging.basicConfig(level="DEBUG") EXAMPLE_HOST = "example.com" @@ -166,7 +167,7 @@ def make_app(noapi, debug): settings.websocket_key = EXAMPLE_WEBSOCKET_KEY language.serve(safe, s, settings) - args["output"] = utils.escape_unprintables(s.getvalue()) + args["output"] = strutils.bytes_to_escaped_str(s.getvalue()) return render(template, False, **args) @app.route('/response_preview') -- cgit v1.2.3