Permalink
Browse files

Webimporter does not import description

Description field is ignored during import.

Fixes #36
  • Loading branch information...
1 parent 0796029 commit d0ea5edb38af5cce5fe0ef321d11920ef4f69e25 @jeroenrnl committed Jan 19, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 php/js/xml.js
View
@@ -112,6 +112,7 @@ var XML=function() {
if(form.tagName=="FORM") {
inputs=form.getElementsByTagName("input");
selects=form.getElementsByTagName("select");
+ textareas=form.getElementsByTagName("textarea");
if(url.indexOf("?")) {
url += "&";
} else {
@@ -124,7 +125,12 @@ var XML=function() {
}
for(i=0; i<selects.length; i++) {
if(selects[i].value) {
- url += selects[i].name + "=" + selects[i].value + "&";
+ url += escape(selects[i].name) + "=" + escape(selects[i].value) + "&";
+ }
+ }
+ for(i=0; i<textareas.length; i++) {
+ if(textareas[i].value) {
+ url += escape(textareas[i].name) + "=" + escape(textareas[i].value) + "&";
}
}
var http=new XMLHttpRequest();

0 comments on commit d0ea5ed

Please sign in to comment.