www

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

commit c95c51907e18edfc25d5bbca9257d5506166ee7e
parent 40b1b1da23f2920ab3724618ffea3e2356cf2856
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon, 28 Sep 2009 20:18:15 +0000

Don't create invalid RTF when citations have brackets


Diffstat:
Mchrome/content/zotero/xpcom/csl.js | 2+-
Mchrome/content/zotero/xpcom/integration.js | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/csl.js b/chrome/content/zotero/xpcom/csl.js @@ -2817,7 +2817,7 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli } if(this.format == "RTF") { - string = string.replace(/[\x7F-\uFFFF]/g, Zotero.CSL.FormattedString._rtfEscapeFunction) + string = string.replace(/[{}\x7F-\uFFFF]/g, Zotero.CSL.FormattedString._rtfEscapeFunction) .replace("\t", "\\tab ", "g"); if(string.substr(string.length-5) == "\\tab ") { diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -607,7 +607,7 @@ Zotero.Integration.Document.prototype._updateDocument = function(forceCitations, var citationText = citation.properties.custom; // XML uses real RTF, rather than the format used for // integration, so we have to escape things properly - citationText = citationText.replace(/[\x7F-\uFFFF]/g, + citationText = citationText.replace(/[{}\x7F-\uFFFF]/g, Zotero.Integration.Session._rtfEscapeFunction). replace("\t", "\\tab ", "g"); } else {