NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on July 29, 2023, 06:06:14 AM

Title: Any simple way to clean a string from non xHtml characters?
Post by: Alberto on July 29, 2023, 06:06:14 AM
If you are showing a simple web browse with Name and Address and this data is comming from a ws reading, that is, its not entered manually, then you can found any kind of characters inside those fields and if any of this is not xHTML compatible then suddenly the browse does not refresh.
This happened to me, suddenly some Addresses comes with #xxx; coded characters. so in addition to the conversion from utf to ansi I need to use DecEntityToChar() in all the string fields, so...

Is there any st method or combination that cleans all the possible non xHTML characters from a string? no matter if you loose data?

Thanks
Title: Re: Any simple way to clean a string from non xHtml characters?
Post by: Bruce on July 31, 2023, 04:16:30 AM
I'm not sure what you are asking, but I think the StringTheory method XMLEncode is what you are looking for.