2008-02-14 Benny Malengier <benny.malengier@gramps-project.org>

* src/DisplayModels/_NoteModel.py: use unicode object internally, #1739


svn: r10030
This commit is contained in:
Benny Malengier 2008-02-14 08:58:37 +00:00
parent 1b9949bdc6
commit d4443d944c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,6 @@
2008-02-14 Benny Malengier <benny.malengier@gramps-project.org>
* src/DisplayModels/_NoteModel.py: use unicode object internally, #1739
2008-02-13 Douglas S. Blank <dblank@cs.brynmawr.edu> 2008-02-13 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/DataViews/GrampletView.py: right-click on name link edits * src/DataViews/GrampletView.py: right-click on name link edits
* src/plugins/DefaultGramplets.py: change tooltip of relation gramplet * src/plugins/DefaultGramplets.py: change tooltip of relation gramplet

View File

@ -100,7 +100,9 @@ class NoteModel(BaseModel):
return unicode(str(temp)) return unicode(str(temp))
def column_preview(self,data): def column_preview(self,data):
note = " ".join(data[2].encode('utf-8').split()) #data is the encoding in the database, make it a unicode object
#for universal work
note = " ".join(unicode(data[2]).split())
note = re.sub(r'(<.*?>)', '', note) note = re.sub(r'(<.*?>)', '', note)
note = note.replace('&amp;', '&') note = note.replace('&amp;', '&')
note = note.replace('&lt;', '<') note = note.replace('&lt;', '<')