Comment #2 on issue 6994 by originalhack: Javascript replace fails with  
moderately large matched string
http://code.google.com/p/chromium/issues/detail?id=6994


For completeness, here's what this is doing...

Once the page is loaded with a huge textarea, the javascript at the end of  
the page
runs.  The 3 alert statemens are showing that it can fund the <mthml> and  
</mhtml>
tags using .match() or .indexOf()

Once it has done that, it tries to remove the (large) chunk of text between  
the tags
with...

document.getElementById('wpTextbox1').value =
document.getElementById('wpTextbox1').value.replace(/<mhtml>((.| 
\n)*?)<\/mhtml>/,
'<mhtml>' + "newstuff" + '</mhtml>');

That works in FF/IE/Safari even with much larger blobs of text and fails in  
Chrome.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to