mirror of
https://github.com/JuanCanham/HackMyResume.git
synced 2025-05-02 20:37:08 +01:00
fix: prevent broken XML in Word docs
This commit is contained in:
6
dist/utils/html-to-wpml.js
vendored
6
dist/utils/html-to-wpml.js
vendored
@ -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 ? '<w:b/>' : '';
|
||||
style += is_italic ? '<w:i/>' : '';
|
||||
style += is_link ? '<w:rStyle w:val="Hyperlink"/>' : '';
|
||||
return final += (is_link ? '<w:hlink w:dest="' + link_url + '">' : '') + '<w:r><w:rPr>' + style + '</w:rPr><w:t>' + tok.chars + '</w:t></w:r>' + (is_link ? '</w:hlink>' : '');
|
||||
return final += (is_link ? '<w:hlink w:dest="' + link_url + '">' : '') + '<w:r><w:rPr>' + style + '</w:rPr><w:t>' + XML(tok.chars) + '</w:t></w:r>' + (is_link ? '</w:hlink>' : '');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user