Fix saving the note of a card

Fixes #3849
This commit is contained in:
Francis Lachapelle
2016-10-20 18:28:58 -04:00
parent 03661eef9e
commit f326ca5ae5
8 changed files with 75 additions and 45 deletions
+20 -20
View File
@@ -705,28 +705,28 @@
// return [self _cardStringWithLabel: @"Timezone:" value: [card tz]];
// }
- (NSArray *) notes
{
NSMutableArray *notes;
NSString *note;
NSUInteger count, max;
// - (NSArray *) notes
// {
// NSMutableArray *notes;
// NSString *note;
// NSUInteger count, max;
notes = [NSMutableArray arrayWithArray: [card notes]];
max = [notes count];
for (count = 0; count < max; count++)
{
note = [notes objectAtIndex: count];
note = [note stringByEscapingHTMLString];
note = [note stringByReplacingString: @"\r\n"
withString: @"<br />"];
note = [note stringByReplacingString: @"\n"
withString: @"<br />"];
// notes = [NSMutableArray arrayWithArray: [card notes]];
// max = [notes count];
// for (count = 0; count < max; count++)
// {
// note = [notes objectAtIndex: count];
// note = [note stringByEscapingHTMLString];
// note = [note stringByReplacingString: @"\r\n"
// withString: @"<br />"];
// note = [note stringByReplacingString: @"\n"
// withString: @"<br />"];
[notes replaceObjectAtIndex: count withObject: note];
}
// [notes replaceObjectAtIndex: count withObject: note];
// }
return notes;
}
// return notes;
// }
/* hrefs */
@@ -888,7 +888,7 @@
o = [self urls];
if ([o count]) [data setObject: o forKey: @"urls"];
o = [self notes];
o = [card notes];
if (o) [data setObject: o forKey: @"notes"];
o = [self _fetchAndCombineCategoriesList];
if (o) [data setObject: o forKey: @"allCategories"];