I kinda don't like two things here: 1. looks too complicated 2. I don't want to do expensive operations like replacements and formating in text too often. 

I can't think of a nicer way to do it though and since we have this result behind upstream cache, I guess we can keep it this way for now.