tag-manager icon indicating copy to clipboard operation
tag-manager copied to clipboard

Special chars and umlaute

Open ben-dw opened this issue 5 years ago • 2 comments

I'd like to replace HTML specialchars like & or ü to it's real UTF8 characters. Every time I want to save a CUSTOM HTML tag it replaces it from: pagename = pagename.replace("&", "&"); to pagename = pagename.replace("&", "&"); How can we fix it?

ben-dw avatar Dec 04 '18 13:12 ben-dw

I can reproduce it, at the same time I don't really know we can fix it... it's a problem "deep" in Matomo how it handles API parameters and that it "sanitizes" all input parameter which is anti-pattern and it shouldn't do it. This forces the tag manager to "unsanitize" the input parameters Common::unsanitizeInputValue($value); and the original value gets lost.

Maybe @sgiehl @diosmosis @mattab have an idea.

tsteur avatar Dec 04 '18 18:12 tsteur

@tsteur the only way I think of would be to have a special case where the "Custom HTML" field value would not use the defaut method but directly read the value from the raw request? it would be if we didn't modify people's code in a custom html block!

mattab avatar Apr 28 '20 05:04 mattab