thanks Massimo. that works. Is it also possible to make the image float:left or right So the text flowes around the image. I tried adding float:left; to the _style but it doesnt have any effect.
On Tuesday, September 11, 2012 8:50:56 PM UTC+2, Massimo Di Pierro wrote: > > You should be able to do: > > {{ > if Article.InTextImage.thumb: > src = URL('download',args=Article.InTextImage.thumb) > content > = > Article.Content.replace('<<Image>>',IMG(_src=src,_style='display:block;').xml()) > else: > content = Article.Content.replace('<<Image>>','') > pass > =XML(content, sanitize=True) # sanitize=True is optional but recommended > }} > > > > On Tuesday, 11 September 2012 11:51:42 UTC-5, BlueShadow wrote: >> >> It does contain HTML for formatting. I display it by this line: >> {{=XML(Article.Content)}} to be exact >> >> On Tuesday, September 11, 2012 6:49:40 PM UTC+2, Massimo Di Pierro wrote: >>> >>> It depends. Does content contain HTML? >>> >>> On Tuesday, 11 September 2012 11:36:02 UTC-5, BlueShadow wrote: >>>> >>>> So what is the right way to do it? >>>> >>>> On Tuesday, September 11, 2012 6:15:29 PM UTC+2, Massimo Di Pierro >>>> wrote: >>>>> >>>>> You should not do it that way because the value of content would be >>>>> escaped. >>>>> >>>>> --