content between two track changes del tags is getting deleted on some circumstances

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • None
    • Affects Version/s: None
    • Component/s: TrackChanges

      problem

      If a segment contains the following del structure (the whitespaces are important too!):

      "This <del>is</del><ins>was</ins> the <ins>castle</ins><del>house</del> of St. Nicholas."

      The expected result would be after export:

      "This was the castle of St. Nicholas."

      but the result is indeed:

      "This of St. Nicholas."

      reason

      Currently we have the following regular expression to remove double whitespaces resulting from deleting a <del></del> where a whitespace was before and one was after:

      / <del[^>]*>.*?<\/del> /

      The problem is now, that the regex behaves completely correctly: it searches for the first <del> with leading whitespace, and then for the first </del> with trailing whitespace. The fact that the first del is closed with a </del> without a trailing whitespace is not checked in the regex so far. Then the whole content in between is replaced.

            Assignee:
            Thomas Lauria
            Reporter:
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: