[web-devel] [Yesod] Nesting widgets
Michael Snoyman
michael at snoyman.com
Tue Jun 7 13:00:40 CEST 2011
On Tue, Jun 7, 2011 at 1:57 PM, Mats Rauhala <mats.rauhala at gmail.com> wrote:
> On 06:46 Tue 07 Jun , Michael Snoyman wrote:
>> On Mon, Jun 6, 2011 at 11:40 PM, Mats Rauhala <mats.rauhala at gmail.com> wrote:
>> > On 20:37 Mon 06 Jun , Michael Snoyman wrote:
>> >> Sorry for a terse reply, but the trick is to replace addHamlet with
>> >> addWidget, and the original code should work. Let me know if you're
>> >> still having trouble, I should have more time to respond next week.
>> >
>> > Does that mean that with the basic hamlet package, you can't reuse html?
>>
>> I'm not sure what the question means, but to my knowledge there's no
>> problem with HTML reuse. Can you clarify?
>>
>
> A while ago I tried to insert hamlet html into another hamlet template,
> but all of it came out escaped. I figured after your post that it
> doesn't happen with addWidget, but addWidget is part of the yesod-core
> package.
I'd have to see the code in question to see why it came out escaped,
but the short answer is that you can embed HTML without escaping it
with pure Hamlet, no Yesod required.
Michael
More information about the web-devel
mailing list