kirti
(keerthi Y)
July 16, 2024, 11:01am
1
Hi guys ,
Please let me any function available for escape the special character in between the name
“Board+of+Public+Utilities+of+the+City+of+Kansas+City%2C+Kansas”
normal i need like this
Board of Public Utilities of the City of Kansas City, Kansas
I tried this function name @pzUnescapeHTMLSpecialChars but it’s not working .
Please help me it’s urgent
SohamM95
(Soham Majumdar)
July 16, 2024, 11:38am
2
@kirti
You can use the function replaceAll and replace the special chars with . You can also use the function removeSpecialChars to remove the chars then formulate your own logic to add spaces.
kirti
(keerthi Y)
July 16, 2024, 11:51am
3
@SohamM95
Actually, i am using the property here. I used removeSpecialChars but instead of space it’s come _ how to over that issue.
Hi @kirti ,
You can use JS to fine tune the users input in the first place via replacing the special characters with spaces via calling js code on change.
Sharing a sample js code
function validateSpecialSymbol() {
const textbox = document.getElementsByClassName(‘customClass’);
const value = textbox.value;
textbox.value = value.replace(/[^a-zA-Z0-9 ]/g, ‘’);
}
The CustomClass can be added to the text input over the section on the control
SohamM95
(Soham Majumdar)
July 16, 2024, 1:35pm
5
@kirti
Over that result use replaceAll where you replace _ with " "