Commit b7241065 authored by albert-github's avatar albert-github

Bug 668424 - HTML links in RTF output are broken

There are different types of hyperlinks: external and internal. The internal hyperlinks should have \\l behind the word HYPERLINK, the external shouldnt.
parent 58058025
...@@ -325,7 +325,7 @@ void RTFDocVisitor::visit(DocURL *u) ...@@ -325,7 +325,7 @@ void RTFDocVisitor::visit(DocURL *u)
{ {
m_t << "{\\field " m_t << "{\\field "
"{\\*\\fldinst " "{\\*\\fldinst "
"{ HYPERLINK \\\\l \""; "{ HYPERLINK \"";
if (u->isEmail()) m_t << "mailto:"; if (u->isEmail()) m_t << "mailto:";
m_t << u->url(); m_t << u->url();
m_t << "\" }" m_t << "\" }"
...@@ -1130,7 +1130,7 @@ void RTFDocVisitor::visitPre(DocHRef *href) ...@@ -1130,7 +1130,7 @@ void RTFDocVisitor::visitPre(DocHRef *href)
{ {
m_t << "{\\field " m_t << "{\\field "
"{\\*\\fldinst " "{\\*\\fldinst "
"{ HYPERLINK \\\\l \"" << href->url() << "\" " "{ HYPERLINK \"" << href->url() << "\" "
"}{}" "}{}"
"}" "}"
"{\\fldrslt " "{\\fldrslt "
......
...@@ -1049,7 +1049,7 @@ void RTFGenerator::startHtmlLink(const char *url) ...@@ -1049,7 +1049,7 @@ void RTFGenerator::startHtmlLink(const char *url)
if (Config_getBool("RTF_HYPERLINKS")) if (Config_getBool("RTF_HYPERLINKS"))
{ {
t << "{\\field {\\*\\fldinst { HYPERLINK \\\\l \""; t << "{\\field {\\*\\fldinst { HYPERLINK \"";
t << url; t << url;
t << "\" }{}"; t << "\" }{}";
t << "}{\\fldrslt {\\cs37\\ul\\cf2 "; t << "}{\\fldrslt {\\cs37\\ul\\cf2 ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment