#827 ✓resolved
Tomoaki Hayasaka

``<links-for-collection>`` produces html-escaped results

Reported by Tomoaki Hayasaka | October 9th, 2010 @ 06:11 AM | in Hobo 1.3 (Rails 3)

<links-for-collection> produces html-escaped results. I'm using

<links-for-collection with="&User.all"/>

for a test and it produces

&lt;a class=&quot;user-link&quot; href=&quot;......

Fix:

diff --git a/hobo/lib/hobo/rapid/taglibs/rapid_core.dryml b/hobo/lib/hobo/rapid/taglibs/rapid_core.dryml
index 49f1ca5..7442d47 100644
--- a/hobo/lib/hobo/rapid/taglibs/rapid_core.dryml
+++ b/hobo/lib/hobo/rapid/taglibs/rapid_core.dryml
@@ -467,7 +467,7 @@ Assuming the context is a blog post...
 <def tag="collection-view" polymorphic><links-for-collection merge-attrs/></def>
 
 <!-- Renders a comma separated list of links (`<a>`), or "(none)" if the list is empty -->
-<def tag="links-for-collection"><%= this.empty? ? "(none)" : context_map { a }.join(", ") %></def>
+<def tag="links-for-collection"><%= this.empty? ? "(none)" : context_map { a }.safe_join(", ") %></def>
 
 <!-- Renders `this` in localized :default format. `format` can be a symbol representing a locale key or a standard format string (see strftime) -->
 <def tag="view" for="Date" attrs="format"><%= this && (format||= :default) && I18n.backend.localize(I18n.locale, this, format) %></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

Tags

Referenced by

Pages