Skip to content

Commit 93152a4

Browse files
authored
Merge commit from fork
Sanitize data in PNotify notifications
2 parents 4f460c7 + a2a78f7 commit 93152a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

octoprint_bedlevelvisualizer/static/js/bedlevelvisualizer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ $(function () {
187187
self.processing(false);
188188
new PNotify({
189189
title: 'Bed Visualizer Error',
190-
text: '<div class="row-fluid"><p>Looks like your settings are not correct or there was an error.</p><p>Please see the <a href="https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/#tips" target="_blank">Readme</a> for configuration tips.</p></div><p><pre style="padding-top: 5px;">'+mesh_data.error+'</pre></p>',
190+
text: '<div class="row-fluid"><p>Looks like your settings are not correct or there was an error.</p><p>Please see the <a href="https://github.com/jneilliii/OctoPrint-BedLevelVisualizer/#tips" target="_blank">Readme</a> for configuration tips.</p></div><p><pre style="padding-top: 5px;">'+_.escape(mesh_data.error)+'</pre></p>',
191191
hide: true
192192
});
193193
return;
@@ -384,7 +384,7 @@ $(function () {
384384
} catch(err) {
385385
new PNotify({
386386
title: 'Bed Visualizer Error',
387-
text: '<div class="row-fluid">Errors while attempting render of mesh data.</div><div class="row-fluid">Error:</div><div class="row-fluid"><pre style="padding-top: 5px;">'+err+'</pre></div><div class="row-fluid">Received Data:</div><div class="row-fluid"><pre style="padding-top: 5px;">'+data+'</pre></div>',
387+
text: '<div class="row-fluid">Errors while attempting render of mesh data.</div><div class="row-fluid">Error:</div><div class="row-fluid"><pre style="padding-top: 5px;">'+_.escape(err)+'</pre></div><div class="row-fluid">Received Data:</div><div class="row-fluid"><pre style="padding-top: 5px;">'+_.escape(data)+'</pre></div>',
388388
type: 'error',
389389
hide: false
390390
});

0 commit comments

Comments
 (0)