Mercurial > web-gnusto
changeset 39:f346d0d99f78
Fixed some bugs regarding the escaping of output, some CSS changes.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 15 May 2008 02:11:25 -0700 |
parents | 696fef276111 |
children | 832c043dfd47 |
files | gnusto.css trivial-zui.js |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gnusto.css Thu May 15 01:54:01 2008 -0700 +++ b/gnusto.css Thu May 15 02:11:25 2008 -0700 @@ -25,3 +25,7 @@ #cursor { text-decoration: blink; } + +.finished-input { + color: gray; +}
--- a/trivial-zui.js Thu May 15 01:54:01 2008 -0700 +++ b/trivial-zui.js Thu May 15 02:11:25 2008 -0700 @@ -68,7 +68,7 @@ self._inputString = ""; self._currentCallback = null; - // TODO: Escape finalInputString. + finalInputString = finalInputString.entityify(); $("#current-input").replaceWith( ('<span class="finished-input">' + finalInputString + '</span><br/>') @@ -78,9 +78,9 @@ } if ($("#current-input") && oldInputString != self._inputString) { - // TODO: Escape self._inputString. $("#current-input").html( - self._inputString + '<span id="cursor">_</span>' + self._inputString.entityify() + + '<span id="cursor">_</span>' ); } }, @@ -152,6 +152,7 @@ onPrint: function(output) { if (self._activeWindow == 0) { + output = output.entityify(); output = output.replace('\n', '<br/>', 'g'); $("#content").append(output); window.scroll(0, document.body.scrollHeight);