Highlighting terms with character encodings


We’ve recently started using the highlight fields functionality to highlight search terms within content titles and descriptions in our search results. I noticed an issue though where some of our PDF titles have encoded spaces in them (i.e., %20 instead of " ") and it causes the highlighting to be incorrect when there are multiple search terms. For example, if you search for “real estate” and the result title is “Real%20Estate%20Asssessments.pdf”, only “Real” is highlighted. Is there a way to decode data in fields before the Swiftype makes the highlighting selection?

Thanks for your help!