Re: modify html code on the fly



Igor,

Thanks for the advice. I did read those article and have worked with
the sample MIME filter from microsoft's site. I have one problem that
I am working through right now, but thought you might know right away
what I am referring to. The sample was for XML files to be converted
to html. That's not exactly what I am looking to do as I am looking to
modify html files. So I changed the required code in the register from
"Text/XML" to "Text/html". And now it correctly intercepts all html
being downloaded. I modified the code as necessary to accomplish my
goal. But for testing purposes, I first wanted to just intercept the
html and then pass it on without changing anything. So the websites
should properly load and display. This is where a problem is
occurring. Rather then rendering the website, IE is now just
displaying the html in its raw format. So now when I navigate to
google, I see this showing up in the browser:

<html><head><meta http-equiv="content-type" content="text/html;
charset=UTF-8"><title>Google</title>........(and so on).

Off hand, do you have any idea what might be occurring?

Thanks,
Chris






On Apr 3, 5:43 pm, "Igor Tandetnik" <itandet...@xxxxxxxx> wrote:
chris.s...@xxxxxxxxx wrote:
I have been trying to get this to work for days now and am having very
little luck with it. I'm trying to use the IWebbrowser2 control to
essentially capture thehtmlbefore it is render so i could alter the
htmlcode then have the newhtmlrendered. One example of what I am
trying to do is to replace an image on a site with my own image. So
basically it would replace the <img src = "/base/logo.jpg" with my own
- <img src="c:\mylogo.jpg".

Read about MIME filters:

http://msdn2.microsoft.com/en-us/library/aa767916.aspxhttp://support.microsoft.com/kb/260840

--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigsflyjust fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as theyfly
overhead. -- RFC 1925

.



Relevant Pages

  • Re: modify html code on the fly
    ... to the end and then replacing certain characters within the xml file, ... use as a base to what I am trying which is to use a MIME filter to ... but the page never loads. ... I changed the registry code to filter html ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: modify html code on the fly
    ... the sample MIME filter from microsoft's site. ... displaying the html in its raw format. ... report the MIME type of the data you are providing. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)