Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

convert html special characters


  • Please log in to reply
3 replies to this topic
Bruttosozialprodukt
  • Members
  • 457 posts
  • Last active: Oct 18 2015 08:47 AM
  • Joined: 20 Oct 2012
Is there an easy way to convert html code like:
'hello "test"' - >
-----> blablabla <-----

to

'hello "test"' - >
-----> blablabla <-----


I think there are some more special characters. Like §$%&~

Well, I heared that it there might be a simple 'transform' function for that?

I'd appreciate it!. happy.png

faqbot
  • Members
  • 997 posts
  • Last active:
  • Joined: 10 Apr 2012
Search the forum for a unhtm function, by SKAN I think.

jethrow
  • Moderators
  • 2854 posts
  • Last active: May 17 2017 01:57 AM
  • Joined: 24 May 2009
Another option would be to simply write the html to a html document & then read the text:
html =
(
'hello &quot;test&quot;' - &gt;
-----&gt; blablabla &lt;-----
)

StringReplace, html, html, `n, </p>, All    ;`
document := ComObjCreate("HTMLFile")
document.write(html)
MsgBox % document.body.outerText


Bruttosozialprodukt
  • Members
  • 457 posts
  • Last active: Oct 18 2015 08:47 AM
  • Joined: 20 Oct 2012
Thanks jethrow, this did the job for me. happy.png