Ignore:
Timestamp:
21/04/09 15:12:22 (11 years ago)
Author:
cbyrom
Message:

Adjust the Atom and MolesEntity? data models to store their data
internally, 'as is' - and to escape/unescape XML unfriendly characters
on data export/import. Adjust templates and inputs processing to
cope with this change - which allows the input of most characters
without problem (NB, old method caused unfriendly errors when illegal
characters were detected).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/templates/utils.html

    r5175 r5212  
    11<?python 
     2 from xml.sax.saxutils import escape 
    23 def et2string(x): 
    34     #use this to strip namespaces for children within text elements 
     
    5253                                # adjust non-editable data to cope with newlines 
    5354                                nonEditVal = "" 
     55                                value = escape(value) 
    5456                                if value: 
    5557                                        nonEditVal = value.replace('\n', '<br />') 
Note: See TracChangeset for help on using the changeset viewer.