Global string substitution?

Does anyone know of a blanket means in CakePHP 3x to force an html entity (string a) to be used instead of a given character (string b) every single time the raw character (string b) is printed from a view without me having to specifically treat every echo statement?

I’m specifically looking to replace ä with ä because the raw ä is rendered incorrectly in browsers for some reason (weight and spacing gets messed up). I see other characters automatically treated (i.e., newlines and ampersands)… so someplace in the code deals with this already… but I’m not feeling gutsy enough to blindly muck around with the base code.

Are you using h() or helpers methods that support it? If that so, you can open a issue in the repo to handle it.

Yeah. It’s wrapped in an autoParagraph() and h().

1 Like