Skip to content

Commit 8cefe58

Browse files
authored
fix bug with html escape in dashboard, fix werkzeug dependency (#184)
1 parent 054e72b commit 8cefe58

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

datapackage_pipelines/web/templates/dashboard.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,11 @@ <h1 class="panel-title">
291291
$.get("{{ url_for('dpp.main') }}" + "api/" + field + "/" + pipeline_id,
292292
function(data) {
293293
text = data.text;
294-
contents = '<pre>';
294+
contents = '';
295295
for (i = 0 ; i < text.length ; i++) contents += text[i] + '\n';
296-
contents = contents + '</pre>';
297-
target.html(contents);
296+
contentsPre = $('<pre>');
297+
contentsPre.text(contents);
298+
target.html('').append(contentsPre);
298299
target.attr('data-full', true);
299300
}, 'json');
300301
}

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def read(*paths):
4141
'globster>=0.1.0',
4242
'dataflows>=0.0.65',
4343
'python-dateutil<2.8.1',
44+
'werkzeug<1.0'
4445
]
4546
SPEEDUP_REQUIRES = [
4647
'dataflows[speedup]',

tests/serve/html_output.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from dataflows import Flow
2+
import logging
3+
4+
5+
class MyClass():
6+
pass
7+
8+
9+
def flow(*_):
10+
logging.info('my_object=' + str(MyClass()))
11+
return Flow()

tests/serve/pipeline-spec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
html-output:
2+
pipeline:
3+
- flow: html_output

0 commit comments

Comments
 (0)