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

def AttachmentField::PortalTransformsAttachment::PortalTransformsAttachment::convertStringToIndex (   self,
  content,
  content_type,
  instance 
)

convertStringToIndex(self, content, content_type, instance) => Utility to convert a string to HTML
using the converter stuff.

Reimplemented from AttachmentField::AttachmentHandler::AbstractHandler.

Definition at line 164 of file PortalTransformsAttachment.py.

00164                                                                    :
        """
        convertStringToIndex(self, content, content_type, instance) => Utility to convert a string to HTML
        using the converter stuff.
        """
        # Convert indexer output to plain "optimized" text
        index = self._convertStringToMime(content, content_type, instance, "text/plain")
        index = striphtml.strip(index)
        words = []
        for w in string.split(index):
            stripped = string.lower(string.strip(w))
            if not stripped in words:
                words.append(stripped)
        words.sort
        return string.join(words, " ")

    def convertStringToPreview(self, content, content_type, instance):


Generated by  Doxygen 1.6.0   Back to index