Serious problem with recursion in find replace

  •  09-08-2008, 9:01 AM

    Serious problem with recursion in find replace

    There is a serious error which crashes browsers in Cute Editors Find Replace implementation.
     
    This issue is reproducable in the samples on http://richtextbox.com
     
    To reproduce this issue perform the following steps:
     
    1. Enter some text e.g. Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test
    2. Click Find Replace
    3. Find=Test
    4. Replace=TestD
    5. Replace All
    6. Browser will die
    It seems like the find replace performs the following steps:
    1. Find Test
    2. Replace it with TestD
    3. Find Test then finds TestD (The text already replaced)
    4. Makes it TestDD
    5. Finds TestDD (The text already replaced twice)
    6. Makes it with TestDDD
    7. The recursive loop crashes the browser.
    If you need any further information then please let me know.
    Filed under: ,
View Complete Thread