diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index f2e94b266..37f725853 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -1561,18 +1561,43 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli if(!dontEscape) { if(this.format == "HTML") { - // replace HTML entities - string = string.replace(/&/g, "&"); - string = string.replace(//g, ">"); + var newString = ""; + + for(var i=0; i + newString += '>'; + break; + case 8211: // en-dash + newString += '–' + break; + case 8212: // em-dash + newString += '—' + break; + default: + newString += string[i]; + } + } + + string = newString; + } else if(this.format == "RTF") { var newString = ""; // go through and fix up unicode entities - for(i=0; i 127) { // encode unicode - newString += "\\uc0\\u"+charCode.toString()+" "; + newString += "{\\uc0\\u"+charCode.toString()+"}"; } else if(charCode == 92) { // double backslashes newString += "\\\\"; } else { @@ -1580,7 +1605,7 @@ Zotero.CSL.FormattedString.prototype.append = function(string, element, dontDeli } } - string = newString + string = newString; } else if(this.format == "Integration") { string = string.replace(/\\/g, "\\\\"); } diff --git a/scrapers.sql b/scrapers.sql index b35ce6f18..0a8f6b8e7 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,4 +1,4 @@ --- 220 +-- 221 -- ***** BEGIN LICENSE BLOCK ***** -- @@ -22,7 +22,7 @@ -- Set the following timestamp to the most recent scraper update date -REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-04-24 15:30:00')); +REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2007-04-25 23:40:00')); REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2007-03-21 15:26:54', '1', '100', '4', 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon', 'function detectWeb(doc, url) { @@ -11086,7 +11086,7 @@ REPLACE INTO csl VALUES('http://purl.org/net/xbiblio/csl/styles/apa.csl', '2007- '); -REPLACE INTO csl VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-date.csl', '2007-03-23 19:25:00', 'Chicago Manual of Style (Author-Date)', +REPLACE INTO csl VALUES('http://www.zotero.org/namespaces/CSL/chicago-author-date.csl', '2007-04-25 23:40:00', 'Chicago Manual of Style (Author-Date)', ' '); -REPLACE INTO csl VALUES('http://www.zotero.org/namespaces/CSL/chicago-note-bibliography.csl', '2007-03-23 21:30:00', 'Chicago Manual of Style (Note with Bibliography)', +REPLACE INTO csl VALUES('http://www.zotero.org/namespaces/CSL/chicago-note-bibliography.csl', '2007-04-25 23:40:00', 'Chicago Manual of Style (Note with Bibliography)', '