You need to create a popover instance that has the html option enabled (place this in your javascript file after the popover JS code):
$('.popover-with-html').popover({ html : true });
Then the link syntax would be:
<%= link_to('Q', '#', :class => "popover-with-html", :title => "Quality", "data-content" => "#{some_content_object.html_safe}") %>
If you’re dynamically generating the content, then you need to use html_safe like David suggested so Rails doesn’t escape the HTML code. Otherwise, you can just place HTML directly within that content attribute.