hjq annotate-tag in hobo 1.3 problem. Where to fix?

13 views
Skip to first unread message

Spiralis

unread,
Jan 7, 2011, 8:51:28 PM1/7/11
to hob...@googlegroups.com
<def tag="annotate-tag">
  <%= "<!-- json_annotation (#{attributes.to_json}); -->" %>
</def>

This tag definition from Bryans hobo-jquery plugin converts the comment start and end to &lt; and &gt; entities in the output. Which makes the annotate-tag unusable.

Is this the expected behavior when printing comment brackets to the html-view? In other words; is this something that should be fixed in dryml or in hobo-jquery?

~Ronny


Spiralis

unread,
Jan 7, 2011, 8:58:39 PM1/7/11
to hob...@googlegroups.com
BTW: I have solved this by adding .html_safe to the string, and my vote is for fixing this in hobo-jquery...

~Ronny

Bryan Larsen

unread,
Jan 12, 2011, 9:27:55 AM1/12/11
to hob...@googlegroups.com
Please try using .html_safe! instead and let me know if that works for
you. .html_safe isn't available in Rails 2.3. .html_safe! isn't
available in rails 2.2, but I'm sure that all rails 2.2 users of
hobo-jquery have frozen their versions by now...

thanks,
Bryan

> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Dev" group.
> To post to this group, send email to hob...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobodev+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobodev?hl=en.

Ronny Hanssen

unread,
Jan 16, 2011, 4:03:51 PM1/16/11
to hob...@googlegroups.com
I tried your change and html_safe! worked in rails 3.

But, I tried to dig a little (not much, just a little :) and found this: https://rails.lighthouseapp.com/projects/8994/tickets/4847-patch-remove-unused-stringhtml_safe

Doesn't this imply that html_safe! is deprecated - and that it was in fact removed in 2.3.9?

I am surprised to see this working in rails 3. Was the method revived?

~Ronny

Ronny Hanssen

unread,
Jan 16, 2011, 5:58:06 PM1/16/11
to hob...@googlegroups.com
Ops. I see now that the .html_safe! did not work. I probably didn't do enough testing to expose the problem earlier. I need to use .html_safe to make it work.

~Ronny
Reply all
Reply to author
Forward
0 new messages