[Zope] Remove/Ignore <P> and other HTML tags

Paul Winkler pw_lists at slinkp.com
Fri Sep 15 16:18:32 EDT 2006


On Fri, Sep 15, 2006 at 12:24:36PM -0700, Zhi-Wei Lu wrote:
> Paul,  Thank you for your tip of
> text = container.research[name].read()

Sure. Please keep discussion on the mailing list, thanks.
 
> Actually, in my case it should be
> text = container.research[name].research_description_html
> 
> research_description_html contains abstract in HTML format.
> 
> When I post the the message, I got it wrong, actually I want
> the "text" to preserve HTML  format rather than &lt;P&gt;  as it show  
> in the
> page source,  when it returns to the main index_html from this function.
> 
> Do you know how and where I set the html_quote flag?

No, I don't. All that you showed us of where this text goes is: 

> >><dtml-let
> >>    rand1="get_random_image()"
> >>    cap1="get_folder_title(name=rand1)"
> >>    text="get_abstract_sample(name=rand1)">
> >>   <table cellpadding=0 cellspacing=0><tr>
> >>


Presumably the dtml method/document where you found that code 
contains something like: <dtml-var text>.
I am *guessing* that it looks like <dtml-var text html_quote>
or <dtml-var text html_quote=1>.

Remove the html_quote attribute and you should be OK.

But since you say this used to work in zope 2.7,
there is probably some other problem.

It's hard to say without having access to more of your code.
Sorry.

-PW

-- 

Paul Winkler
http://www.slinkp.com


More information about the Zope mailing list