Bug 654188 - Cannot Find or Find/Replace Text that Contains Angle Brackets
Cannot Find or Find/Replace Text that Contains Angle Brackets
Product: Fedora
Classification: Fedora
Component: gedit (Show other bugs)
Unspecified Unspecified
low Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2010-11-16 23:50 EST by David Le Sage
Modified: 2012-08-16 18:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-16 18:18:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description David Le Sage 2010-11-16 23:50:10 EST
Description of problem:
If the user searches for a string that contains angle brackets (such as an XML or HTML tag), the "find" tool will not be able to locate it.

Version-Release number of selected component (if applicable):
2.30.4-1.fc14 (64 bit)

How reproducible:
Every time.

Steps to Reproduce:
1. Open up an XML file, such as one that contains a lot of <listitem> tags.
2. Search -> Find -> <listitem> (with the "Match entire word only" option ticked.)
3. Nothing is found.
4. Search again for listitem without the angle brackets. All instances will be found.
5. The Search->Replace tool suffers from the same problem.

Actual results:
Cannot find the instances of the string <listitem> in the document.

Expected results:
Every instance of <listitem> in text should be highlighted and hitting find should jump user from instance to instance.

Additional info:
I tried variants such as listitem> (with just the closing angle bracket) and the same problem occurs so there seems to be a problem with using the angle bracket character when doing searches in this release of gEdit.
Comment 1 Brendan Jones 2010-11-17 08:08:23 EST

It seems that gedit iterates through the document looking for text matching the input text. If found and 'Entire word' is checked, it then does a check that the found text starts and ends as a natural word according to the Pango library via the GtkTextIter::gtk_text_iter_starts_word and GtkTextIter::gtk_text_iter_starts_word functions (gedit-document.c:1883 and others) .

As a < or > bracket is not part of a natural language word according to Pango the find fails.

I'm not convinced thisa is a bug nor how useful the 'entire word' search is for XML elements in any case - unchecking 'Match entire word only' will find the text.

Assigning for the maintainer to comment before closing.

Fedora Bugzappers volunteer triage team
Comment 2 Fedora End Of Life 2012-08-16 18:18:16 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Note You need to log in before you can comment on or make changes to this bug.