diff --git a/src/index.js b/src/index.js
index 31fe52fa..5c11e0bf 100644
--- a/src/index.js
+++ b/src/index.js
@@ -183,7 +183,8 @@ function renderToString(vnode, context, opts, inner, isSvgMode, selectValue) {
}
if (name==='dangerouslySetInnerHTML') {
- html = v && v.__html;
+ html = v ? v.__html : null; // do not use v && v.__html to prevent dangerouslySetInnerHTML="foo"
+ pretty = false;
}
else if ((v || v===0 || v==='') && typeof v!=='function') {
if (v===true || v==='') {
diff --git a/test/pretty.js b/test/pretty.js
index ba85c556..82fb336c 100644
--- a/test/pretty.js
+++ b/test/pretty.js
@@ -21,6 +21,33 @@ describe('pretty', () => {
expect(rendered).to.equal(` hello
foo +bar+
{` + bar`}+
+ bar+
foo +bar