Skip to content

Commit

Permalink
Bug: correct conversion of quotes: single quote -> ', double quo…
Browse files Browse the repository at this point in the history
…te -> ". Fixes gh-335
  • Loading branch information
rwaldron committed Apr 15, 2020
1 parent 3ffa67a commit ec62949
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const util = {
* @private
*/
_HTMLConvertor: function (contents) {
const ec = {'&': '&amp;', '\u00A0': '&nbsp;', '\'': '&quot;', '<''&lt;', '>''&gt;'};
return contents.replace(/&|\u00A0|'|<|>/g, function (m) {
const ec = {'&': '&amp;', '\u00A0': '&nbsp;', '\'': '&apos;', '"': '&quot;', '<''&lt;', '>''&gt;'};
return contents.replace(/&|\u00A0|'|"|<|>/g, function (m) {
return (typeof ec[m] === 'string') ? ec[m] : m;
});
},
Expand Down

0 comments on commit ec62949

Please sign in to comment.