[gnote] Trim title in backlinks
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Trim title in backlinks
- Date: Sun, 13 Feb 2011 16:50:36 +0000 (UTC)
commit 8798e7d1ac7a762578d58c237d8b037e673980c3
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date: Sun Feb 13 18:41:45 2011 +0200
Trim title in backlinks
XmlEncoder::encode might add newline at the end.
Before searching notes, trim the encoded title.
Fixes Bug 638321.
src/addins/backlinks/backlinksnoteaddin.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/addins/backlinks/backlinksnoteaddin.cpp b/src/addins/backlinks/backlinksnoteaddin.cpp
index 8a94ed1..67e1a87 100644
--- a/src/addins/backlinks/backlinksnoteaddin.cpp
+++ b/src/addins/backlinks/backlinksnoteaddin.cpp
@@ -155,8 +155,8 @@ void BacklinksNoteAddin::update_menu()
void BacklinksNoteAddin::get_backlink_menu_items(std::list<BacklinkMenuItem*> & items)
{
std::string search_title = get_note()->get_title();
- std::string encoded_title
- = gnote::utils::XmlEncoder::encode(sharp::string_to_lower(search_title));
+ std::string encoded_title = sharp::string_trim(
+ gnote::utils::XmlEncoder::encode(sharp::string_to_lower(search_title)));
// Go through each note looking for
// notes that link to this one.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]