Escaping special characters before highlighting

Hi all.

I need to perform some operation on the results of a ferret search
before it gets highlighted. Is there a way to do this?

This is my code which calls the highlighting inside a Rails View:
<%= result.ferret_highlight(@query, :field => :ferret_text, :pre_tag =>
’, :post_tag => ‘’) %>