We should not assume the output is html safe if the input is not. I think in particular with page titles we can't assume they are html safe.
I ran into a similar issue here: https://github.com/Crabgrass/Crabgrass-Core/pull/46/files - see entity display helper. There i worked around it with a helper method:
```ruby
def with_html_safety(text)
  text.html_safe? ? yield.html_safe : yield
end
```
This won't work here because we require the output to be html_safe if the shy was added. So instead i would just apply html_escape on the text before the gsub. If it was html_safe that should be a noop - otherwise this function would escape and force_wrap and set the html_safe state. I think we should have no functions that turn text into html_safe text without escaping it.