开发者

HAML & RoR: Auto-convert apostrophes, etc., to ASCII HTML entities?

Is there anyway to have HAML automatically convert all my apostrophe's ' to the HTML character entity equivalents (’)?

Ditto with all the other characters that one would want to 开发者_开发知识库convert (dashes, double-quotes, etc.) for better online readability.

?


This wouldn't be something HAML would do. If you want it done, write a helper and use gsub to substitute the characters you want.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜