Merge pull request #585 from aurimasv/nfc
Normalize all user and translator input to NFC
This commit is contained in:
commit
09638cbd2c
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user