开发者

Ampersand not displaying in page title

开发者 https://www.devze.com 2023-02-06 11:09 出处:网络
I am building an application where a company name - like \"Foo & Bar\" is part of the title on some pages.I have tried changing the data to be &, I have tried html_safe, but no luck.

I am building an application where a company name - like "Foo & Bar" is part of the title on some pages. I have tried changing the data to be &, I have tried html_safe, but no luck.

I could change the & to and but I would prefer to preserve the name of the company as the user entered it.

开发者_如何学运维What easy and magical Ruby (1.9.2)/Rails (3) goodness am I missing?


Sorry, I figured it out. I had used an adaptation of Ryan Bates Pretty Page Title (episode 30) and I was calling html_safe in the wrong place.

0

精彩评论

暂无评论...
验证码 换一张
取 消