FORK.Mutate.getScripts() problem on IE6 and IE7

3 views
Skip to first unread message

Artur Opala

unread,
Jul 24, 2008, 4:16:37 AM7/24/08
to forkjav...@googlegroups.com

I've found problem working with FORK.Mutate.getScripts() on IE6 and IE7:
only first execution on the page is succesful, consecutive returns empty
array. Everything works fine after small modification:

Index: mutate.js
===================================================================
< while (match = this.scriptRegExp.exec(html)) { // yes really just
one equals sign
---
> var re = new
RegExp("\\<script.*?\\>((\\n|\\r|.)*?)\\<\\/script\\>", "img");
> while (match = re.exec(html)) { // yes really just one equals sign

Artur Opala


---------------------------------------------------------------------------

Powyższa wiadomość skierowana jest do określonego odbiorcy i zawiera treści przeznaczone tylko dla niego. Ujawnianie tych treści osobom trzecim bądź nieuzasadnione wykorzystywanie do własnych celów jest zabronione. Jeśli otrzymałeś tę wiadomość omyłkowo prosimy usuń ją i skontaktuj się z nadawcą.

Euro Bank S.A. z siedzibą we Wrocławiu 50-126, przy ulicy św. Mikołaja 72, wpisany do Krajowego Rejestru Sądowego pod numerem KRS 0000025313, prowadzonego przez Sąd Rejonowy dla Wrocławia-Fabrycznej, VI Wydział Gospodarczy KRS, posiadający NIP: 521-008-25-38, wysokość kapitału zakładowego: 421 096 011,89 PLN, wysokość kapitału wpłaconego: 421 096 011,89 PLN.

Peter Michaux

unread,
Jul 24, 2008, 1:02:49 PM7/24/08
to forkjav...@googlegroups.com
Hi Artur,

2008/7/24 Artur Opala <artur...@eurobank.pl>:


>
>
> I've found problem working with FORK.Mutate.getScripts() on IE6 and IE7:

Just in case, FORK.Mutate.getScripts is not documented as an API function here

http://forkjavascript.org/mutate/docs

so it should not be called directly.

What is your use case where you need this functionality? Or are you
just pointing out specifically where a bug appears to be happening?


> only first execution on the page is succesful, consecutive returns empty
> array. Everything works fine after small modification:
>
> Index: mutate.js
> ===================================================================
> < while (match = this.scriptRegExp.exec(html)) { // yes really just
> one equals sign
> ---
>> var re = new
> RegExp("\\<script.*?\\>((\\n|\\r|.)*?)\\<\\/script\\>", "img");
>> while (match = re.exec(html)) { // yes really just one equals sign

Can you provide a small test case (a complete HTML page including
script under 40 lines) independent of Fork that shows this bug in
action in IE6 and IE7?

I will keep this in mind when reworking the mutation functions for Fork v0.2.

Thanks,
Peter

Reply all
Reply to author
Forward
0 new messages