https://bugs.kde.org/show_bug.cgi?id=462220

            Bug ID: 462220
           Summary: Kate's search & replace interprets captured text in
                    regex mode
    Classification: Applications
           Product: kate
           Version: 21.12.3
          Platform: Ubuntu
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: search
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: olivier.dela...@gmail.com
  Target Milestone: ---

SUMMARY

When using the Search and Replace tab in regex mode, Kate interprets regex
escape sequences not only in the searched pattern and replacement string, but
also in the captured text. The simpler "replace" interface (accessible through
Edit/Replace...) does not seem to be affected.

STEPS TO REPRODUCE
1. Create a document with the following contents "\t" (without the double
quotes).
2. Open the Search and Replace tab.
3. Enter "^.*$" (without the double quotes) in the "Find" field.
4. Enter "\0" (without the double quotes) in the "Replace" field.
5. Check "Enable regular expressions".
6. Click "Search", then "Replace Checked".

OBSERVED RESULT

The contents of the document are replaced with a tab character.

EXPECTED RESULT

The contents of the document should not change.

SOFTWARE/OS VERSIONS
Ubuntu 22.04.1 LTS
KDE Frameworks: 5.92.0
Qt: 5.15.3 (built against 5.15.3)

ADDITIONAL INFORMATION
Kate 23.03.70 (installed via Flatpak) is also affected, but the "Version"
dropdown in this bug report form does not list that version.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to