How do I stop the WebBrowser control evaluating special characters?



This is a question about the Microsoft Web Browser control. I have version 7
of IE, the project references c:\windows\system32\ieframe.dll, which has the
following details:

File version: 7.0.5730.11
Created 17 Oct 2006 12:33:42

I am developing with VB 6 but I assume the control behaviour is the same
whatever.

I thought this line would get me the HTML from the document currently loaded
into a browser:

WebBrowser1.Document.documentElement.outerHTML

*but* here is my original HTML:

<html>
<body>
[Body]
<hr>
look at these characters &copy; and &reg;
<hr>
trademark = &#8482; = &#x0099; (or &#x2122; ) <br />
registered trademark = &#174; = &#x00AE; <br />
service mark = &#8480 = &#x2120; <br />
copyright = &#169; = &#x00A9; <br />
sound recording copyright = &#8471; = &#x2117; <br />
</body>
</html>

and this is what I get back from the control:

print WebBrowser1.Document.documentElement.outerHTML
<HTML><HEAD></HEAD>
<BODY>[Body]
<HR>
look at these characters © and ®
<HR>
trademark = T = T (or T ) <BR>registered trademark = ® = ® <BR>service mark
= ? = ? <BR>copyright = © = © <BR>sound recording copyright = ? = ?
<BR></BODY></HTML>

How can I stop it evaluating the special characters?


.



Relevant Pages

  • Re: I bet Cindy might know the answer to this one - Make IE work from
    ... You can add an ActiveX control to your form in the form designer based on ... the 'Microsoft Web Browser' control. ... Then you can load a HTML file into the browser control using the Navigate2 ... > In this way it should be possible to create a crude sort of HTML editor ...
    (microsoft.public.fox.programmer.exchange)
  • Refresh rate on a WebBrowser
    ... I have a VB app that is running the Microsoft Web Browser Active X control. ... The HTML page that it pulls up changes frequently. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: oe6 reading mail showing as html raw source?
    ... > CWShredder, Ad-aware, Spybot, HijackThis ... > the Windows Profile is damaged, not OE or any identities, and, barring ... That control is, apparently, being fed from ... normal data and is being transcoded into HTML improperly. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re:
    syntax
    ... control categories Coward 9. ... "HTML", but my initial point is still true that there is no category ... and why your initial term "ASP.NET HTML Form Control" is incorrect). ... representation (and not accesible by the developer via server-side code). ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: syntax
    ... But you should not nitpick while posting mistaken information. ... "HTML" as I stated). ... "ASP.NET HTML Form Control". ... extremly limited server-side representation (and not accesible by the developer via server-side ...
    (microsoft.public.dotnet.framework.aspnet)