tag-manager
tag-manager copied to clipboard
Special chars and umlaute
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?
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 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!