haml / rails: yield title with german umlauts
Posted
by Maxem
on Stack Overflow
See other posts from Stack Overflow
or by Maxem
Published on 2010-06-12T07:55:25Z
Indexed on
2010/06/12
8:03 UTC
Read the original article
Hit count: 291
Hi,
I would like to do something like this in my application layout:
%title= "#{yield(:sub_title)} - Page Name"
and in a real view
- content_for :sub_title do
Übersicht # I tried Übersicht, != "Übersicht" and a bunch of other methods
what happens is, I either get the black pound with the question mark in it -> wrong encoding or the raw string (&UumI;bersicht).
Does anyone know a way how to get this to work? Another requirement is that I'd like to show user generated content in the title and this content may or may not have umlauts in it.
Used versions: Haml 3.0.11, Rails 3 beta4 and currently for development JRuby 1.5
© Stack Overflow or respective owner