Outputting raw text (preformatted HTML)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Outputting raw text (preformatted HTML)

John Thornborrow
Hello all,

Just a quick one.. how can I output raw text to the user agent?

I am working with pre-formatted html ("ugh" I hear you say..) and thus I
need to output the text without escaping/encoding the text.

Currently using:

renderContentOn: html
    model getArticles do: [:article |
        html div class: 'article'; with: article headline, article brief]

Thanks,
John.

www.pinesoft.co.uk


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Outputting raw text (preformatted HTML)

John Thornborrow
Ha, as soon as I send the mail, I found the answer:

renderContentOn: html
    model getArticles do: [:article |
       html div class: 'article'; with: [html html: article headline,
article brief]]

Regards,
John.

John Thornborrow wrote:

> Hello all,
>
> Just a quick one.. how can I output raw text to the user agent?
>
> I am working with pre-formatted html ("ugh" I hear you say..) and thus
> I need to output the text without escaping/encoding the text.
>
> Currently using:
>
> renderContentOn: html
>    model getArticles do: [:article |
>        html div class: 'article'; with: article headline, article brief]
>
> Thanks,
> John.
>
> www.pinesoft.co.uk
>
>
> Pinesoft Computers are registered in England, Registered number:
> 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts,
> EN8 7EA
>
>
>
> This message has been scanned for viruses by BlackSpider MailControl -
> www.blackspider.com
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Outputting raw text (preformatted HTML)

Julien Berthaud
In reply to this post by John Thornborrow
John Thornborrow a écrit :

> Hello all,
>
> Just a quick one.. how can I output raw text to the user agent?
>
> I am working with pre-formatted html ("ugh" I hear you say..) and thus
> I need to output the text without escaping/encoding the text.
>
> Currently using:
>
> renderContentOn: html
>    model getArticles do: [:article |
>        html div class: 'article'; with: article headline, article brief]
>
I think you should use html html: '<div>....blablabla...</div>' in order
to avoid the escape/encoding phase.

renderContentOn: html
   model getArticles do: [:article |
       html div class: 'article'; with: [html html: article headline,
article brief]]

Hope I don't misunderstand what you called "pre-formatted html".

Julien

> Thanks,
> John.
>
> www.pinesoft.co.uk
>
>
> Pinesoft Computers are registered in England, Registered number:
> 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts,
> EN8 7EA
>
>
>
> This message has been scanned for viruses by BlackSpider MailControl -
> www.blackspider.com
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside