Diff for /loncom/interface/spreadsheet/Spreadsheet.pm between versions 1.17 and 1.18

version 1.17, 2003/06/23 19:58:18 version 1.18, 2003/06/25 15:33:49
Line 1202  sub html_editable_cell { Line 1202  sub html_editable_cell {
         $value = &HTML::Entities::encode($value) if ($value !~/ /);          $value = &HTML::Entities::encode($value) if ($value !~/ /);
     }      }
     return $value if (! $allowed);      return $value if (! $allowed);
     # Make the formula safe for outputting      #
     $formula =~ s/\'/\"/g;  
     # The formula will be parsed by the browser twice before being       # The formula will be parsed by the browser twice before being 
     # displayed to the user for editing.      # displayed to the user for editing. 
     $formula = &HTML::Entities::encode(&HTML::Entities::encode($formula));      #
     # Escape newlines so they make it into the edit window      # The encoding string "^A-blah" is placed in []'s inside a regexp, so 
     $formula =~ s/\n/\\n/gs;      # we specify the characters we want left alone by putting a '^' in front.
       $formula = &HTML::Entities::encode($formula,"^A-z0-9 !#\$%-;=?~");
       # Escape it again - this time the only encodable character is '&'
       $formula =~ s/\&/\&/g;
     # Glue everything together      # Glue everything together
     $result .= "<a href=\"javascript:celledit(\'".      $result .= "<a href=\"javascript:celledit(\'".
         $name."','".$formula."');\">".$value."</a>";          $name."','".$formula."');\">".$value."</a>";

Removed from v.1.17  
changed lines
  Added in v.1.18


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>