Logo Search packages:      
Sourcecode: zope-atextensions version File versions  Download package

def ATExtensions::field::records::RecordsField::getViewFor (   self,
  joinWith = ' 

formatted value of the subfield for display

Definition at line 69 of file records.py.

00069                                                                 :
        formatted value of the subfield for display
        raw = self.getRaw(instance)[idx].get(subfield,'')
        if type(raw) in (type(()), type([])):
            raw = joinWith.join(raw)
        # Prevent XSS attacks by quoting all user input
        raw = html_quote(str(raw))
        # this is now very specific
        if subfield == 'email':
            return self.hideEmail(raw,instance)
        if subfield == 'homepage':
            return '<a href="%s">%s</a>' % (raw, raw)
        return raw.strip()

    # store string type subfield values as unicode
    def _encode_strings(self, value, instance, **kwargs):

Generated by  Doxygen 1.6.0   Back to index