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

Tighten up use of xhtml in atom:content element - NB, this requires a
fix when data is re-ingested via elementtree, as this doesn't respect
inner namespaces properly. Also add new keyword to TextArea? template
function, to allow the content to be displayed 'as is' - i.e. without
the XML escaping.

Location:
MILK/trunk/milk_server/milk_server/templates
Files:
2 edited

Legend:

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

    r5215 r5216  
    7373                <div py:if="c.atom.isGranule() and not c.atom.contentFile" py:replace="UploadCSMLOrCDMLFileForm(c.saveLink)"/> 
    7474                <div py:if="not c.atom.isDeployment() and not c.atom.isGranule()" py:replace="TextArea('summary', c.atom.summary, c.saveLink, g.atom_summary, title='Summary')"/> 
    75                 <div py:if="not c.atom.isDeployment() and not c.atom.isGranule()" py:replace="TextArea('Content', c.atom.Content, c.saveLink, g.atom_content)"/> 
     75                <div py:if="not c.atom.isDeployment() and not c.atom.isGranule()" py:replace="TextArea('Content', c.atom.Content, c.saveLink, g.atom_content, noEscapeVal=True)"/> 
    7676                <div py:if="c.atom.isDE()" py:replace="TextArea('lineage', c.atom.ME.lineage, c.saveLink, g.atom_lineage, title='Lineage')"/> 
    7777                <div py:if="c.atom.isDE()" py:replace="TextArea('quality', c.atom.ME.quality, c.saveLink, g.atom_quality, title='Quality Statement')"/> 
  • MILK/trunk/milk_server/milk_server/templates/utils.html

    r5212 r5216  
    4545 
    4646     
    47     <div class="metadataSection" py:def="TextArea(name, value, editLink, helpText, title=None)"> 
     47    <div class="metadataSection" py:def="TextArea(name, value, editLink, helpText, title=None, noEscapeVal=False)"> 
    4848        <?python         
    4949                                divID = name + 'Div' 
     
    5353                                # adjust non-editable data to cope with newlines 
    5454                                nonEditVal = "" 
    55                                 value = escape(value) 
     55                                if not noEscapeView: 
     56                                        value = escape(value) 
    5657                                if value: 
    5758                                        nonEditVal = value.replace('\n', '<br />') 
Note: See TracChangeset for help on using the changeset viewer.