#822 ✓resolved
Tomoaki Hayasaka

contents of ``<repeat>`` are html-escaped

Reported by Tomoaki Hayasaka | October 4th, 2010 @ 08:54 PM | in Hobo 1.3 (Rails 3)

Similar to #808, contents of <repeat> are html-escaped.

For example in Agility,

Assigned users: <repeat:users join=", "><a/></repeat><else>None</else>

in /users or /story/1 is rendered as

Assigned users: &lt;a class=&quot;user-link&quot; href=&quot;/users/1-tomoaki-hayasaka&quot;&gt;&lt;span class=&quot;view user-name &quot;&gt;Tomoaki Hayasaka&lt;/span&gt;&lt;/a&gt;

Possible fix is

diff --git a/dryml/taglibs/core.dryml b/dryml/taglibs/core.dryml
index 496e0a9..28b79c9 100644
--- a/dryml/taglibs/core.dryml
+++ b/dryml/taglibs/core.dryml
@@ -47,7 +47,7 @@ For example, you might want to wrap an `<img>` tag in an `<a>` tag but only unde
   raise ArgumentError, "Cannot <repeat> on #{this.inspect}" unless this.respond_to? :each
   context_map do
     parameters.default
-  end.safe_join(join)
+  end.safe_join(join && join.html_safe)
 %></if></def>
 
 
...

.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Referenced by

Pages