From 7eaf4b098c7ff23af71a067179b82aea4fb1ffef Mon Sep 17 00:00:00 2001 From: David Huynh Date: Thu, 4 Mar 2010 02:04:56 +0000 Subject: [PATCH] Use .text() don't use .html() to render preview values. git-svn-id: http://google-refine.googlecode.com/svn/trunk@186 7d457c2a-affb-35e4-300a-418c747d4874 --- src/main/webapp/scripts/dialogs/expression-preview-dialog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/dialogs/expression-preview-dialog.js b/src/main/webapp/scripts/dialogs/expression-preview-dialog.js index 1e38c223b..147e76bb3 100644 --- a/src/main/webapp/scripts/dialogs/expression-preview-dialog.js +++ b/src/main/webapp/scripts/dialogs/expression-preview-dialog.js @@ -289,13 +289,13 @@ ExpressionPreviewDialog.Widget.prototype._renderPreview = function(expression, d var renderValue = function(td, v) { if (v !== null && v !== undefined) { if ($.isArray(v)) { - td.html(JSON.stringify(v)); + td.text(JSON.stringify(v)); } else if ($.isPlainObject(v)) { $('').addClass("expression-preview-special-value").text("Error: " + v.message).appendTo(td); } else if (typeof v === "string" && v.length == 0) { $('empty string').addClass("expression-preview-special-value").appendTo(td); } else { - td.html(v.toString()); + td.text(v.toString()); } } else { $('null').addClass("expression-preview-special-value").appendTo(td);