diff --git a/dist/utils/html-to-wpml.js b/dist/utils/html-to-wpml.js index bef0dd6..6feb07f 100644 --- a/dist/utils/html-to-wpml.js +++ b/dist/utils/html-to-wpml.js @@ -6,7 +6,9 @@ Definition of the Markdown to WordProcessingML conversion routine. */ (function() { - var HTML5Tokenizer, _; + var HTML5Tokenizer, XML, _; + + XML = require('xml-escape'); _ = require('underscore'); @@ -51,7 +53,7 @@ Definition of the Markdown to WordProcessingML conversion routine. style = is_bold ? '' : ''; style += is_italic ? '' : ''; style += is_link ? '' : ''; - return final += (is_link ? '' : '') + '' + style + '' + tok.chars + '' + (is_link ? '' : ''); + return final += (is_link ? '' : '') + '' + style + '' + XML(tok.chars) + '' + (is_link ? '' : ''); } } }); diff --git a/src/utils/html-to-wpml.coffee b/src/utils/html-to-wpml.coffee index 98cb1b5..f8e5b7e 100644 --- a/src/utils/html-to-wpml.coffee +++ b/src/utils/html-to-wpml.coffee @@ -5,6 +5,7 @@ Definition of the Markdown to WordProcessingML conversion routine. ### +XML = require 'xml-escape' _ = require 'underscore' HTML5Tokenizer = require 'simple-html-tokenizer' @@ -44,6 +45,6 @@ module.exports = ( html ) -> style += if is_link then '' else '' final += (if is_link then ('') else '') + - '' + style + '' + tok.chars + + '' + style + '' + XML(tok.chars) + '' + (if is_link then '' else '') final