summaryrefslogtreecommitdiffstats
path: root/tinydns-edit-html.lsp
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-02-11 09:54:01 +0000
committerTed Trask <ttrask01@yahoo.com>2010-02-11 09:54:01 +0000
commit7224576f0a1eaf03d4663dacc7e38ababd92f672 (patch)
tree5e770af6db61e8296c593dc40cebba7cef34b8ef /tinydns-edit-html.lsp
parent606225b98b0efc2efd28536f3a3d6d784dc5a370 (diff)
downloadacf-tinydns-7224576f0a1eaf03d4663dacc7e38ababd92f672.tar.bz2
acf-tinydns-7224576f0a1eaf03d4663dacc7e38ababd92f672.tar.xz
Remove leading/trailing spaces from edit fields.
Diffstat (limited to 'tinydns-edit-html.lsp')
-rw-r--r--tinydns-edit-html.lsp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tinydns-edit-html.lsp b/tinydns-edit-html.lsp
index ace84b2..9bc1d01 100644
--- a/tinydns-edit-html.lsp
+++ b/tinydns-edit-html.lsp
@@ -47,13 +47,13 @@
var entrytext = entry.find("select").val() + entry.find("input:not(.submit)").map(function(){
if (this.name == "fixme") {
if ($(this).val() != "")
- return $(this).val() + ".<%= html.html_escape(domain) %>";
+ return $(this).val().replace(/^\s\s*/, '').replace(/\s\s*$/, '') + ".<%= html.html_escape(domain) %>";
else
return "<%= html.html_escape(domain) %>";
} else if (this.name == "convertme") {
- return $(this).val().replace(/[\\:\r\n ]/g, char_to_octal);
+ return $(this).val().replace(/^\s\s*/, '').replace(/\s\s*$/, '').replace(/[\\:\r\n ]/g, char_to_octal);
} else {
- return $(this).val();
+ return $(this).val().replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
}).get().join(":");
entry.empty().append(entrytext);