NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on February 08, 2016, 10:03:29 AM
-
Hi,
NT9.05 Apps
Cl 10
I need to convert an xHTML field to Text to include in an email body.
Any ideas?
Brian
-
string theory?
-
Looked at String Theory but not sure I understand it if it is there?
-
For now I moved all fields back to plain text so I don't have this issue.
Thanks.
-
I was thinking you could use ST to remove all tags and convert some to cr\lf etc to automatically translate from xhtml to plain text.
-
Thanks, yes I looked at doing that. My limitation is knowing all the tags I suppose.
I will tackle this in my test environment as I like the xHTML look for the text fields for my customers.
-
check out remove in ST it might do the trick.
-
see RemoveAttributes
http://www.capesoft.com/docs/StringTheory/StringTheory.htm#stRemoveAttributes
That cleans it up a bit. Then Replace to replace some tags with text - for example replacing <br> or <br/> or <p> with CR/LF (ie '<13,10>')
Then other tags need replacing as well, some requiring some thought, especially <ol> and <ul> (ordered and unordered lists), tables and so on.
Cheers
Bruce