www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 09638cbd2c3be068d9564a4025ddca4a78b67422
parent 20dd8c89d8ea2ac8035165d336800f9b553b2311
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  9 Dec 2014 19:21:04 -0500

Merge pull request #585 from aurimasv/nfc

Normalize all user and translator input to NFC
Diffstat:
Mchrome/content/zotero/bindings/tagselector.xml | 4+++-
Mchrome/content/zotero/xpcom/data/collection.js | 2+-
Mchrome/content/zotero/xpcom/data/creator.js | 2+-
Mchrome/content/zotero/xpcom/data/item.js | 2+-
Mchrome/content/zotero/xpcom/data/tag.js | 2+-
Mchrome/content/zotero/xpcom/search.js | 6+++++-
6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml @@ -107,7 +107,9 @@ <parameter name="skipRefresh"/> <body> <![CDATA[ - this._search = val ? val.toLowerCase() : false; + this._search = val + ? val.toLowerCase().normalize() + : false; if (!skipRefresh) { this.refresh(); diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js @@ -113,7 +113,7 @@ Zotero.Collection.prototype._set = function (field, val) { return; case 'name': - val = Zotero.Utilities.trim(val); + val = Zotero.Utilities.trim(val).normalize(); break; } diff --git a/chrome/content/zotero/xpcom/data/creator.js b/chrome/content/zotero/xpcom/data/creator.js @@ -104,7 +104,7 @@ Zotero.Creator.prototype._set = function (field, val) { case 'lastName': case 'shortName': if (val) { - val = Zotero.Utilities.trim(val); + val = Zotero.Utilities.trim(val).normalize(); } else { val = ''; diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -691,7 +691,7 @@ Zotero.Item.prototype.inCollection = function(collectionID) { */ Zotero.Item.prototype.setField = function(field, value, loadIn) { if (typeof value == 'string') { - value = value.trim(); + value = value.trim().normalize(); } this._disabledCheck(); diff --git a/chrome/content/zotero/xpcom/data/tag.js b/chrome/content/zotero/xpcom/data/tag.js @@ -98,7 +98,7 @@ Zotero.Tag.prototype._set = function (field, val) { return; case 'name': - val = Zotero.Utilities.trim(val); + val = Zotero.Utilities.trim(val).normalize(); break; } diff --git a/chrome/content/zotero/xpcom/search.js b/chrome/content/zotero/xpcom/search.js @@ -114,7 +114,7 @@ Zotero.Search.prototype._set = function (field, val) { return; case 'name': - val = Zotero.Utilities.trim(val); + val = Zotero.Utilities.trim(val).normalize(); break; } @@ -481,6 +481,8 @@ Zotero.Search.prototype.addCondition = function(condition, operator, value, requ var [condition, mode] = Zotero.SearchConditions.parseCondition(condition); + if (typeof value == 'string') value = value.normalize(); + this._conditions[searchConditionID] = { id: searchConditionID, condition: condition, @@ -520,6 +522,8 @@ Zotero.Search.prototype.updateCondition = function(searchConditionID, condition, var [condition, mode] = Zotero.SearchConditions.parseCondition(condition); + if (typeof value == 'string') value = value.normalize(); + this._conditions[searchConditionID] = { id: parseInt(searchConditionID), condition: condition,