Don't create invalid RTF when citations have brackets
This commit is contained in:
parent
40b1b1da23
commit
c95c51907e
2 changed files with 2 additions and 2 deletions
|
@ -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 ") {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue