I think you just need:

db.mytable.myfield.represent=lambda x: XML(x,sanitize=True)



On Dec 21, 3:03 am, Johann Spies <[email protected]> wrote:
> I have in the past asked a similar question and could not find a solution.
> I am trying again.  I have to read in thousands of records into a database
> and some entries contains very spesific formatting.  I want to preserve that
> if possible and have them presented as such through web2py.
>
> Here is a partial example of one field before I import it into the database.
>
> "12-deoxyphorbol-13-(2-methylbutyrate)-20-acetate (<b>2</b>), and two new
> phorbol esters,
> 12-deoxyphorbol-13-isobutyrate-16-angelate-20-acetate (<b>3</b>) and
> 12-deoxyphorbol-13-(2-methylbutyrate)-16-angelate-20-acetate (<b>4</b>),
> were isolated from the
> endemic South African plant <i>Euphorbia bothae</i>."
>
> I would appreciate some guidelines on handling this.  I suspect I may have
> to translate such text into markup or markdown.  If so, pointers to
> tutorials will help me please.
>
> Regards
> Johann
>
> --
>  May grace and peace be yours in abundance through the full knowledge of God
> and of Jesus our Lord!  His divine power has given us everything we need for
> life and godliness through the full knowledge of the one who called us by
> his own glory and excellence.
>                                                     2 Pet. 1:2b,3a

Reply via email to