--- a/includes/clientside/tinymce/utils/form_utils.js Mon May 05 20:06:37 2008 -0400
+++ b/includes/clientside/tinymce/utils/form_utils.js Mon May 05 20:08:44 2008 -0400
@@ -1,5 +1,5 @@
/**
- * $Id: form_utils.js 614 2008-02-20 17:57:57Z spocke $
+ * $Id: form_utils.js 673 2008-03-06 13:26:20Z spocke $
*
* Various form utilitiy functions.
*
@@ -170,7 +170,7 @@
}
function trimSize(size) {
- return size.replace(new RegExp('[^0-9%]', 'gi'), '');
+ return size.replace(/([0-9\.]+)px|(%|in|cm|mm|em|ex|pt|pc)/, '$1$2');
}
function getCSSSize(size) {
@@ -179,7 +179,11 @@
if (size == "")
return "";
- return size.indexOf('%') != -1 ? size : size + "px";
+ // Add px
+ if (/^[0-9]+$/.test(size))
+ size += 'px';
+
+ return size;
}
function getStyle(elm, attrib, style) {