diff options
author | Hakim El Hattab | 2013-07-24 23:30:13 -0400 |
---|---|---|
committer | Hakim El Hattab | 2013-07-24 23:30:13 -0400 |
commit | 289ea804ad2c7b99981f49a97d55ae50600d24dc (patch) | |
tree | 722a4802258aa026cef6fe76e9774f5c997bb91b /plugin/markdown/markdown.js | |
parent | b6e85816e594171853625b006f966d91f3fcc9e9 (diff) | |
parent | 3ca598473b710d98e82d094f19d16d428cf2066e (diff) |
Merge branch 'master' of https://github.com/iMilnb/reveal.js into dev
Diffstat (limited to 'plugin/markdown/markdown.js')
-rwxr-xr-x | plugin/markdown/markdown.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index 473666b..9681cf1 100755 --- a/plugin/markdown/markdown.js +++ b/plugin/markdown/markdown.js @@ -128,6 +128,12 @@ var xhr = new XMLHttpRequest(), url = section.getAttribute('data-markdown'); + datacharset = section.getAttribute('data-charset'); + // see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes + if (datacharset != null && datacharset != '') { + xhr.overrideMimeType('text/html; charset=' + datacharset); + } + xhr.onreadystatechange = function () { if( xhr.readyState === 4 ) { if (xhr.status >= 200 && xhr.status < 300) { |