Home All Groups Group Topic Archive Search About

How to completely disable Javascript in a Webbrowser control

Author
5 Dec 2008 6:37 AM
rimblock
Hi,
Does anyone know how to do this?!

At the moment i have hacked together something that parses the HTML
before loading it, removing all <script .. /> blocks. Of course, i
just realised that javascript can be found in element attributes too,
so rather than spend the next week hunting down every possible place
javascript could be hiding (i expect there a thousands!), i am hoping
there is a way to disable it.

I need a programmatic method, so 'disable active scripting' from IE's
tools menu is not an option for me :0(.

Thanks in advance of your wise words of wisdom,
James.

Author
7 Dec 2008 12:10 AM
Ignacio Machin ( .NET/ C# MVP )
On Dec 5, 1:37 am, rimblock <j.r.ran***@googlemail.com> wrote:
Show quoteHide quote
> Hi,
> Does anyone know how to do this?!
>
> At the moment i have hacked together something that parses the HTML
> before loading it, removing all <script .. /> blocks. Of course, i
> just realised that javascript can be found in element attributes too,
> so rather than spend the next week hunting down every possible place
> javascript could be hiding (i expect there a thousands!), i am hoping
> there is a way to disable it.
>
> I need a programmatic method, so 'disable active scripting' from IE's
> tools menu is not an option for me :0(.
>
> Thanks in advance of your wise words of wisdom,
> James.

I do not know of any way, except manually disabling it , There most be
a way manipulating the registry, but this has global implications. If
you find a way please post it back as somebody else asked me the same
question.

Sorry not be of more help.



Post Thread options