From 6dc3ce6e006549daebebac9e8687940eb979054d Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Sun, 26 Feb 2006 20:25:43 +0000 Subject: [PATCH] Bug 328134: margin field in page setup accepts '^' and '|' characters, r+branch181=neil --- toolkit/components/printing/content/printPageSetup.js | 7 +------ xpfe/global/resources/content/printPageSetup.js | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/toolkit/components/printing/content/printPageSetup.js b/toolkit/components/printing/content/printPageSetup.js index fcb324b0c872..d8c976aaf5a8 100644 --- a/toolkit/components/printing/content/printPageSetup.js +++ b/toolkit/components/printing/content/printPageSetup.js @@ -112,12 +112,7 @@ function isListOfPrinterFeaturesAvailable() //--------------------------------------------------- function checkDouble(element) { - var value = element.value; - if (value && value.length > 0) { - value = value.replace(/[^\.|^0-9]/g,""); - if (!value) value = ""; - element.value = value; - } + element.value = element.value.replace(/[^.0-9]/g, ""); } // Theoretical paper width/height. diff --git a/xpfe/global/resources/content/printPageSetup.js b/xpfe/global/resources/content/printPageSetup.js index c45150a23aed..1a916e02812e 100644 --- a/xpfe/global/resources/content/printPageSetup.js +++ b/xpfe/global/resources/content/printPageSetup.js @@ -112,12 +112,7 @@ function isListOfPrinterFeaturesAvailable() //--------------------------------------------------- function checkDouble(element) { - var value = element.value; - if (value && value.length > 0) { - value = value.replace(/[^\.|^0-9]/g,""); - if (!value) value = ""; - element.value = value; - } + element.value = element.value.replace(/[^.0-9]/g, ""); } // Theoretical paper width/height.