diff --git a/src/insets/InsetNewline.cpp b/src/insets/InsetNewline.cpp
index 7cb2e70e1f..4d0f7ef9da 100644
--- a/src/insets/InsetNewline.cpp
+++ b/src/insets/InsetNewline.cpp
@@ -19,6 +19,7 @@
#include "Lexer.h"
#include "MetricsInfo.h"
#include "OutputParams.h"
+#include "output_xhtml.h"
#include "frontends/Application.h"
#include "frontends/FontMetrics.h"
@@ -173,9 +174,10 @@ int InsetNewline::docbook(odocstream & os, OutputParams const &) const
}
-docstring InsetNewline::xhtml(odocstream & os, OutputParams const &) const
+docstring InsetNewline::xhtml(XHTMLStream & xs, OutputParams const &) const
{
- os << "
\n";
+ xs << CompTag("br");
+ xs.cr();
return docstring();
}
diff --git a/src/insets/InsetNewline.h b/src/insets/InsetNewline.h
index 8f9d57527e..31ab4451a9 100644
--- a/src/insets/InsetNewline.h
+++ b/src/insets/InsetNewline.h
@@ -66,7 +66,7 @@ private:
///
int docbook(odocstream &, OutputParams const &) const;
///
- docstring xhtml(odocstream &, OutputParams const &) const;
+ docstring xhtml(XHTMLStream &, OutputParams const &) const;
///
void read(Lexer & lex);
///
diff --git a/src/output_xhtml.h b/src/output_xhtml.h
index f0e1578d15..bed9971a30 100644
--- a/src/output_xhtml.h
+++ b/src/output_xhtml.h
@@ -60,6 +60,9 @@ struct EndTag {
// Tags like
struct CompTag {
///
+ CompTag(std::string const & tag)
+ : tag_(tag) {}
+ ///
CompTag(std::string const & tag, std::string const & attr)
: tag_(tag), attr_(attr) {}
///