edit: there is a replaceAll() method in JS, my bad !
anyhow, you can use the replace() method and use a regular expression to replace all occurrences of a string, taken from your provided example you could do something like this:
PARAMS += "&Ueberschrift=" + ueberschrift.replace(/\>/g, ">").replace(/\</g, "<"); PARAMS += "&TextBaustein=" + textBaustein.replace(/\>/g, ">").replace(/\</g, "<"); PARAMS += "&Beurteilung=" + beurteilung.replace(/\>/g, ">").replace(/\</g, "<");
To elaborate:
'g' flag indicates that the replacement should occur for all matches (not just the first one)
> and < characters are escaped to match the actual > and < characters.
'>' and '<' (HTML escape codes for '>' and '<')