It works without .html_safe
because @chapter.chaptext
is being rendered as a string inside textcontainer
. I think the problem is that class = 'getannotation'
is overriding your style (lead class) or maybe id = 'textcontainer'
with a style rule like #textcontainer p { font-size: 20px;}
Use a web inspector tool to see what style is being applied to chaptext
content and where it come from (CSS class).