--- MPIWGWeb/MPIWGProjects.py 2005/05/26 14:37:50 1.47.2.3 +++ MPIWGWeb/MPIWGProjects.py 2005/05/27 06:47:19 1.47.2.4 @@ -1135,7 +1135,7 @@ class MPIWGProject(CatalogAware,Folder): """get attrbiute""" return getattr(self,field) - def getContent(self,field): + def getContent(self,field,filter=None): """Inhalt des Feldes""" text=u'' @@ -1167,12 +1167,34 @@ class MPIWGProject(CatalogAware,Folder): if (text2=='') and (field=='WEB_project_header'): return self.getContent('WEB_title') + if filter: + splitted=text2.split("""

""") + tmp=splitted[1].split("

") + self.REQUEST.SESSION['image']=tmp[0].split("\"")[1].encode('utf-8') + split2="

".join(tmp[1:]) + + text3=splitted[0]+split2 + + splitted=text3.split("""

""") + tmp=splitted[1].split("

") + print tmp + self.REQUEST.SESSION['imagecap']=tmp[0].encode('utf-8') + split4="".join(tmp[1:]) + + text5=splitted[0]+split4 + + else: + text5=text2 + #teste ob WEB_project_description und keine führenden p tags - if (len(text2)>4) and (not text2[0:3]=='

') and (field=='WEB_project_description'): - return "

"+text2+"

" + if (len(text5)>4) and (not text5[0:3]=='

') and (field=='WEB_project_description'): + return "

"+text5+"

" - return text2.encode('utf-8') + #filter image + + + return text5.encode('utf-8') def show_html(self): """simple index"""