My guess is that in this concatenation one, or both, of the strings is not #html_safe. Here's a console example of what I mean:

    [21] pry(main)> s
    => "abc"
    [22] pry(main)> s.html_safe? 
    => true
    [23] pry(main)> s1 
    => "<a>b</a>"
    [24] pry(main)> s1.html_safe?
    => false
    [25] pry(main)> r = s + s1
    => "abc&lt;a&gt;b&lt;/a&gt;"