From 4b272baf50e3e2d6ca80c09f4a374d9f18ec6e6e Mon Sep 17 00:00:00 2001 From: "asqueella%gmail.com" Date: Thu, 1 Mar 2007 07:17:54 +0000 Subject: [PATCH] Fix bug 86093 - Tab chars in html source show up as "[]" (square) in Error Console (replace all whitespace characters with spaces) p=Simon Bunzli r=gavin, sr=neil --- toolkit/components/console/content/consoleBindings.xml | 2 +- xpfe/components/console/resources/content/consoleBindings.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/console/content/consoleBindings.xml b/toolkit/components/console/content/consoleBindings.xml index 16f08c2f6b6..e3a0d54af12 100644 --- a/toolkit/components/console/content/consoleBindings.xml +++ b/toolkit/components/console/content/consoleBindings.xml @@ -174,7 +174,7 @@ row.setAttribute("hideSource", "true"); } if (aObject.sourceLine) { - row.setAttribute("code", aObject.sourceLine.replace("\n", "", "g")); + row.setAttribute("code", aObject.sourceLine.replace(/\s/g, " ")); if (aObject.columnNumber) { row.setAttribute("col", aObject.columnNumber); row.setAttribute("errorDots", this.repeatChar(" ", aObject.columnNumber)); diff --git a/xpfe/components/console/resources/content/consoleBindings.xml b/xpfe/components/console/resources/content/consoleBindings.xml index ac32c8f7cf9..a0ec5cc5cc1 100644 --- a/xpfe/components/console/resources/content/consoleBindings.xml +++ b/xpfe/components/console/resources/content/consoleBindings.xml @@ -180,7 +180,7 @@ row.setAttribute("hideSource", "true"); } if (aObject.sourceLine) { - row.setAttribute("code", aObject.sourceLine.replace("\n", "", "g")); + row.setAttribute("code", aObject.sourceLine.replace(/\s/g, " ")); if (aObject.columnNumber) { row.setAttribute("col", aObject.columnNumber); row.setAttribute("errorDots", this.repeatChar(" ", aObject.columnNumber));