From: Jason Woofenden Date: Fri, 1 Feb 2013 05:22:24 +0000 (-0500) Subject: ui: html-encode white text too X-Git-Tag: v1.0~5 X-Git-Url: https://jasonwoof.com/gitweb/?p=watch-my-terminal.git;a=commitdiff_plain;h=20b6a8c3e134b91c2eb0ed9b0cdeda6cd8efe111;hp=a5f32e3687419a20da142d86f1d4e4f44b60cb52 ui: html-encode white text too --- diff --git a/client.coffee b/client.coffee index e5615af..282b742 100644 --- a/client.coffee +++ b/client.coffee @@ -77,8 +77,8 @@ $ -> return 'background-' + color_to_css(i ^ 0x080000) stylize = (txt, style) -> - if (txt.length == 0 or style == 0x000007) - return txt + return '' if txt.length is 0 + return $('').text txt if style is 0x000007 css = '' css += 'font-weight: bold; ' if style & 0x010000 css += 'text-decoration: underline; ' if style & 0x020000