--- loncom/homework/edit.pm	2001/06/29 18:53:50	1.16
+++ loncom/homework/edit.pm	2001/07/13 16:15:01	1.18
@@ -183,6 +183,15 @@ sub insert_numericalresponse {
 </numericalresponse>';
 }
 
+sub insert_stringresponse {
+  return '
+<stringresponse answer="" type="">
+    <textline />
+    <hintgroup>
+    </hintgroup>
+</stringresponse>';
+}
+
 sub insert_optionresponse {
   return '
 <optionresponse max="10">
@@ -262,6 +271,8 @@ sub rebuild_tag {
   if ($token->[0] eq 'S') {
     $result = '<'.$token->[1];
     while (my ($key,$val)= each(%{$token->[2]})) {
+      $val=~s:^\s|\s$::g;
+      $val=~s:"::g; #"
       &Apache::lonxml::debug("setting :$key: to  :$val:");
       $result.=' '.$key.'="'.$val.'"';
     }